---
title: "Unity SDK: Callbacks"
description: "Handle widget events and lifecycle callbacks with the Gleap Unity SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/674-unity-sdk-callbacks
collection: "Unity (Beta)"
updated: 2026-11-01
language: en
---

# Unity SDK: Callbacks

Handle widget events and lifecycle callbacks with the Gleap Unity SDK. Follow the integration code examples.

Set callbacks for different actions to get notified on certain state changes of the Gleap widget. This enables you to create an even deeper integration with Gleap.

```csharp
Gleap.RegisterListener("feedbackFlowStarted", flow =>
{
    // Do something with the flow
});
```

```csharp
Gleap.RegisterListener("initialized", _ =>
{
    // Do something when Gleap is initialized
});
```

```csharp
Gleap.RegisterListener("notificationCountUpdated", count =>
{
    // Do something with the count
});
```

```csharp
Gleap.RegisterListener("feedbackSent", _ =>
{
    // Do something
});
```

```csharp
Gleap.RegisterListener("feedbackSendingFailed", _ =>
{
    // Do something
});
```

```csharp
Gleap.RegisterListener("widgetOpened", _ =>
{
    // Do something
});
```

```csharp
Gleap.RegisterListener("widgetClosed", _ =>
{
    // Do something
});
```

You can detach a listener again with `Gleap.RemoveListener(eventName, handler)`.

## Related

- [Unity SDK setup](https://docs.gleap.ai/en/articles/664-unity-sdk-setup.md)
- [Unity SDK: User identity](https://docs.gleap.ai/en/articles/665-unity-sdk-user-identity.md)
- [Unity SDK: Track events](https://docs.gleap.ai/en/articles/666-unity-sdk-track-events.md)
- [Unity SDK: Track pages](https://docs.gleap.ai/en/articles/667-unity-sdk-track-pages.md)
- [Unity SDK: Forms](https://docs.gleap.ai/en/articles/668-unity-sdk-forms.md)
