> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/scene-fusion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnotification.md).

# Class sfNotification

Namespace: [KS.SceneFusion.Client.Unity.Editor](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

A notification with a message, category and list of uobjects it applies to.

```csharp
public class sfNotification
```

#### Inheritance

object ← [sfNotification](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnotification.md)

## Properties

### Category <a href="#ks_scenefusion_client_unity_editor_sfnotification_category" id="ks_scenefusion_client_unity_editor_sfnotification_category"></a>

Category

```csharp
public sfNotificationCategory Category { get; }
```

#### Property Value

[sfNotificationCategory](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnotificationcategory.md)

### IsActive <a href="#ks_scenefusion_client_unity_editor_sfnotification_isactive" id="ks_scenefusion_client_unity_editor_sfnotification_isactive"></a>

Is the notification in the notification window?

```csharp
public bool IsActive { get; }
```

#### Property Value

bool

### Message <a href="#ks_scenefusion_client_unity_editor_sfnotification_message" id="ks_scenefusion_client_unity_editor_sfnotification_message"></a>

Notifaction message

```csharp
public string Message { get; }
```

#### Property Value

string

### Objects <a href="#ks_scenefusion_client_unity_editor_sfnotification_objects" id="ks_scenefusion_client_unity_editor_sfnotification_objects"></a>

List of uobjects the notification applies to.

```csharp
public ksConstList<Object> Objects { get; }
```

#### Property Value

ksConstList\<Object>

## Methods

### AddToObject(Object) <a href="#ks_scenefusion_client_unity_editor_sfnotification_addtoobject_unityengine_object" id="ks_scenefusion_client_unity_editor_sfnotification_addtoobject_unityengine_object"></a>

Adds the notification to a uobject. A notification can be added to the same uobject multiple times and must be removed the same number of times to remove it.

```csharp
public int AddToObject(Object uobj)
```

#### Parameters

`uobj` Object

uobj to add the notification to.

#### Returns

int

number of times the notification was added to the uobject. It must be removed this number of times to fully remove it.

### Clear() <a href="#ks_scenefusion_client_unity_editor_sfnotification_clear" id="ks_scenefusion_client_unity_editor_sfnotification_clear"></a>

Removes the notification from all uobjects and the notification window.

```csharp
public void Clear()
```

### Create(sfNotificationCategory, string, params Object\[]) <a href="#ks_scenefusion_client_unity_editor_sfnotification_create_ks_scenefusion_client_unity_editor_sfnotifi" id="ks_scenefusion_client_unity_editor_sfnotification_create_ks_scenefusion_client_unity_editor_sfnotifi"></a>

Creates or finds an existing notification and adds uobjects to it.

```csharp
public static sfNotification Create(sfNotificationCategory category, string message, params Object[] objects)
```

#### Parameters

`category` [sfNotificationCategory](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnotificationcategory.md)

category for the notification.

`message` string

message for the notification.

`objects` Object\[]

objects to add to the notification.

#### Returns

[sfNotification](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnotification.md)

notification

### Remove(sfNotificationCategory, string, params Object\[]) <a href="#ks_scenefusion_client_unity_editor_sfnotification_remove_ks_scenefusion_client_unity_editor_sfnotifi" id="ks_scenefusion_client_unity_editor_sfnotification_remove_ks_scenefusion_client_unity_editor_sfnotifi"></a>

Removes a notification from some uobjects. If this removes all uobjects from the notification or is called without uobjects, removes the notification. If a notification was added to a uobject multiple times, it must be removed the same number of times to remove it.

```csharp
public static void Remove(sfNotificationCategory category, string message, params Object[] objects)
```

#### Parameters

`category` [sfNotificationCategory](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfnotificationcategory.md)

category of notification.

`message` string

message of notification.

`objects` Object\[]

objects to remove. Will remove the notification if no objects are provided.

### RemoveFromObject(Object) <a href="#ks_scenefusion_client_unity_editor_sfnotification_removefromobject_unityengine_object" id="ks_scenefusion_client_unity_editor_sfnotification_removefromobject_unityengine_object"></a>

Removes the notification from a uobject. A notification can be added to the same uobject multiple times and must be removed the same number of times to remove it.

```csharp
public int RemoveFromObject(Object uobj)
```

#### Parameters

`uobj` Object

uobj to remove the notification from.

#### Returns

int

number of remaining times the notification was added to the uobject. It must be removed again this number of times to fully remove it. Returns -1 if the notification could not be removed because it wasn't found on the uobject.
