# Notification Manager

<figure><img src="/files/SMbV0BBCQO8S2axJ8wIC" alt=""><figcaption></figcaption></figure>

### Overview

The Notification Manager is what manages all the notifications.&#x20;

* **Active Timer** - How long the notification stays alive for
* **Use Title** - If OFF, then the title will be blank
* **Use Desc** - If OFF, then the description will be blank
* **Notification GO** - The Notification gameobject that will be instantiated when a new notification is generated
* **Notification Parent** - The parent transform of where the notification is instantiated.

If unsure, refer to the above image and leave the settings as they are.

The Notification Manager is a singleton which means only one manager can exist at one given time. The benefit to this is that it makes creating a new notification really easy. Let's now do that...

### Creating a new notification

Creating a new notification yourself is easy.&#x20;

You simply, from your own scripts, call the following function:<br>

```csharp
NotificationManager.notificationManager.OpenNotification(string TitleToUse = "", string DescToUse = "");
```

So as a working example of what I've used in the Inventory System:

```csharp
NotificationManager.notificationManager.OpenNotification("ITEM ADDED", "Added: " + itemAdded.itemName);
```

Which in game, looks like:<br>

<figure><img src="/files/UmIjfzfLgHpdwZW6ZHOO" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/notification-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
