# ObjectiveData

Kind: Class · Namespace: Sansar.Simulation · Assembly: Sansar.Simulation.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-class" data-pagefind-filter="kind:Class">Class</span>
<span data-pagefind-filter="namespace:Sansar.Simulation">Namespace <a href="/scripting/api/sansar.simulation"><code>Sansar.Simulation</code></a></span>
<span>Inherits <a href="/scripting/api/sansar.script/eventdata">Sansar.Script.EventData</a></span>
<span class="api-badge api-since">Added in 34.7.0</span>
</div>

<span id="T:Sansar.Simulation.ObjectiveData"></span>

Handler for Objective state change events.

```csharp
public class ObjectiveData : Sansar.Script.EventData
```

## Members at a glance

| Kind | Members |
|---|---|
| **Properties** | [AgentId](#agentid) · [State](#state) |
| **Methods** | [ToString](#tostring) |

## Properties

### AgentId

<div class="api-card">
<span id="P:Sansar.Simulation.ObjectiveData.AgentId"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 34.7.0</span></div>

```csharp signature
public Sansar.Script.SessionId AgentId { get; }
```

The SessionId of the agent on the quest.

</div>

### State

<div class="api-card">
<span id="P:Sansar.Simulation.ObjectiveData.State"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 34.7.0</span></div>

```csharp signature
public ObjectiveState State { get; }
```

The state of the objective

</div>


## Methods

### ToString

<div class="api-card">
<span id="M:Sansar.Simulation.ObjectiveData.ToString"></span>
<span id="M:Sansar.Simulation.ObjectiveData.ToString()"></span>
<div class="api-badges"><span class="api-badge api-since">Added in 34.7.0</span></div>

```csharp signature
public override string ToString()
```

A string representation of this object.

**Returns:** [string](https://learn.microsoft.com/dotnet/api/system.string) — A string representation of this object.

<details class="api-remarks"><summary>Remarks</summary>

The format of this string may change between releases.

</details>

</div>


## Used in examples

- [QuestDebugExample.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/QuestDebugExample.cs)
- [ScriptLibrary/Quest/QuestObjectBase.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestObjectBase.cs)
- [ScriptLibrary/Quest/QuestVisibility.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestVisibility.cs)

<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>