# SitObjectData

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>
</div>

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

Handler for agent sit events.

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

## Members at a glance

| Kind | Members |
|---|---|
| **Properties** | [ComponentId](#componentid) · [ObjectId](#objectid) · [SitObjectEvent](#sitobjectevent) · [SitObjectInfo](#sitobjectinfo) |
| **Methods** | [ToString](#tostring) |

## Properties

### ComponentId

<div class="api-card">
<span id="P:Sansar.Simulation.SitObjectData.ComponentId"></span>

```csharp signature
public Sansar.Script.ComponentId ComponentId { get; }
```

The ComponentId of the object the agent is sitting on [`RigidBodyComponent`](/scripting/api/sansar.simulation/rigidbodycomponent).

</div>

### ObjectId

<div class="api-card">
<span id="P:Sansar.Simulation.SitObjectData.ObjectId"></span>

```csharp signature
public Sansar.Script.ObjectId ObjectId { get; }
```

The ObjectId of the object the agent is sitting on

</div>

### SitObjectEvent

<div class="api-card">
<span id="P:Sansar.Simulation.SitObjectData.SitObjectEvent"></span>

```csharp signature
public SitEventType SitObjectEvent { get; }
```

The type of sit event which occurred.

</div>

### SitObjectInfo

<div class="api-card">
<span id="P:Sansar.Simulation.SitObjectData.SitObjectInfo"></span>

```csharp signature
public SitObjectInfo SitObjectInfo { get; }
```

information about the object the agent is sitting on

</div>


## Methods

### ToString

<div class="api-card">
<span id="M:Sansar.Simulation.SitObjectData.ToString"></span>
<span id="M:Sansar.Simulation.SitObjectData.ToString()"></span>

```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

- [ScriptLibrary/Scene/SitStand.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/SitStand.cs)

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