# Objective

### Objective Class

The Objective is the interface for a user's Quest Objective

### Syntax

### Member Details

#### Agent Property

> The session Id for the user on this quest.
>
> #### Syntax
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Count Property

> Get the number of objectives collected for this user.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> \[set: Sansar.Script.Interface]\
> public [int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) **Count** { get; set; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Definition Property

> #### Syntax
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetState Method

> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [ObjectiveState](https://help.sansar.com/hc/en-us/Sansar.Simulation/ObjectiveState.html) **GetState** ()
>
> **Returns**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Ready Property

> If the Objective data is ready.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **Ready** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetState Method

> Set the state of the objective.
>
> #### Syntax
>
> **Parameters**
>
> > *state*
> >
> > The state to transition to.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetState Method

> Set the state of the objective.
>
> #### Syntax
>
> **Parameters**
>
> > *state*
> >
> > The state to transition to.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Subscribe Method

> Subscribes to Objective Events.
>
> #### Syntax
>
> **See Also**
>
> **Parameters**
>
> > *State*
> >
> > The state of the objective
> >
> > *callback*
> >
> > Callback which is executed when the event completes.
> >
> > *persistent*
> >
> > Optional, set to false to unsubscribe after one event.
>
> **Returns**
>
> > An [Sansar.Script.IEventSubscription](/latest/script-api-docs/sansar-script-namespace/ievent-subscription.md) that can be used to cancel the subscription.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the ObjectiveDefinition data.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Update** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the ObjectiveDefinition data.
>
> #### Syntax
>
> **Parameters**
>
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectiveData Class

Handler for Objective state change events.

### Syntax

### Member Details

#### AgentId Property

> The SessionId of the agent on the quest.
>
> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### State Property

> The state of the objective
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [ObjectiveState](https://help.sansar.com/hc/en-us/articles/360031121951) **State** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectiveDefinition Class

The ObjectiveDefinition stores the data that is used to create quest objective instances for users.

### Syntax

### Member Details

#### Description Property

> The objective description.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Description** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetObjective Method

> Get the state of this objective for a particular user.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The [Sansar.Script.SessionId](https://help.sansar.com/hc/en-us/articles/115003551808) of the user.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetObjective Method

> Get the state of this objective for a particular user.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **GetObjective** ([AgentPrivate](https://help.sansar.com/hc/en-us/articles/115003361386) agent)
>
> **Parameters**
>
> > *agent*
> >
> > Obtain the objective state for this user.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetObjective Method

> Get the state of this objective for a particular user.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The [Sansar.Script.SessionId](https://help.sansar.com/hc/en-us/articles/115003551808) of the user.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetObjective Method

> Get the state of this objective for a particular user.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > Obtain the objective state for this user.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### InitialState Property

> The initial state that this objective will have when a user starts the quest
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [ObjectiveState](https://help.sansar.com/hc/en-us/Sansar.Simulation/ObjectiveState.html) **InitialState** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Ready Property

> If the QuestDefinition data is ready.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **Ready** { get; }
>
> **See Also**
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### RequiredCount Property

> The required count to complete the objective.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) **RequiredCount** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Title Property

> The objective title.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Title** { get; }
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the ObjectiveDefinition data.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **Update** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Update Method

> Update the ObjectiveDefinition data.
>
> #### Syntax
>
> **Parameters**
>
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectiveState Enum

State of a quest objective for a user.

### Syntax

\[Sansar.Script.Interface]\
public enum **ObjectiveState**

### Remarks

### Members

| Member Name   | Description                                                                |
| ------------- | -------------------------------------------------------------------------- |
| **Active**    | The objective is currently active and available to complete for this user. |
| **Completed** | The objective has been completed for this user.                            |
| **Locked**    | The objective is locked for this user and can not be completed.            |
| **None**      | The objective state is not set, probably the user is not on the quest.     |

### Requirements

**Namespace:** Sansar.Simulation\
**Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
**Assembly Versions:** 1.1.0.0

***

### ObjectiveDefinition.GetObjectiveData Class

### Syntax

### Member Details

#### Objective Property

> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Objective](https://help.sansar.com/hc/en-us/articles/360031121771) **Objective** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectPrivate Class

Interface to an object in a [Sansar.Simulation.Cluster](https://help.sansar.com/hc/en-us/articles/115003513287) in the Scene.

### Syntax

### Member Details

#### AddInteraction Method

> Add an Interaction to the object to make it clickable.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **AddInteraction** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) prompt, [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) enabled)
>
> **Parameters**
>
> > *prompt*
> >
> > The string prompt to show on hover, leave blank to only highlight the object.
> >
> > *enabled*
> >
> > Whether or not the interaction is enabled.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AddInteraction Method

> Add an Interaction to the object to make it clickable.
>
> #### Syntax
>
> **Parameters**
>
> > *prompt*
> >
> > The string prompt to show on hover, leave blank to only highlight the object.
> >
> > *enabled*
> >
> > Whether or not the interaction is enabled.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### FindScripts Generic Method

> Looks up scripts on this ObjectPrivate that match the interface type by class name.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> \[Sansar.Script.NonReflective]\
> \[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Sansar.Simulation.ObjectPrivate/d\_\_45\`1))]\
> public [IEnumerable](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1) **FindScripts** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) name)\
> where TInterface : class
>
> **Type Parameters**
>
> > *TInterface*
> >
> > The interface to find.
>
> **Parameters**
>
> > *name*
> >
> > The type name of the script's class to find.
>
> **Returns**
>
> > An IEnumerable which contains all scripts of the given type name on this ObjectPrivate that match the given interface.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ForwardVector Property

> The forward vector of the ObjectPrivate in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **ForwardVector** { get; }
>
> **Value**
>
> > A normalized vector.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetComponent Method

> Get interfaces to the components that are available at runtime.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [object](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object) **GetComponent** ([ComponentType](https://help.sansar.com/hc/en-us/articles/115003435147) componentType, [uint](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.UInt32) index)
>
> **Parameters**
>
> > *componentType*
> >
> > [Sansar.Simulation.ComponentType](https://help.sansar.com/hc/en-us/articles/115003435147).
> >
> > *index*
> >
> > uint32 index
>
> **Returns**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetComponentCount Method

> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [uint](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.UInt32) **GetComponentCount** ([ComponentType](https://help.sansar.com/hc/en-us/articles/115003435147) componentType)
>
> **Parameters**
>
> > *componentType*
> >
> > [Sansar.Simulation.ComponentType](https://help.sansar.com/hc/en-us/articles/115003435147)
>
> **Returns**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### InitialPosition Property

> The position of the ObjectPrivate in world frame before simulation started.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **InitialPosition** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### InitialRotation Property

> The rotation of the ObjectPrivate in world frame before simulation started.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Quaternion](/latest/script-api-docs/sansar-namespace/quarterion.md) **InitialRotation** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### LookupScripts Method

> Get handles to the scripts on the ObjectPrivate
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [object](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object)\[] **LookupScripts** ()
>
> **Returns**
>
> > object \[] of Objects of the scripts on the ObjectPrivate
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Name Property

> This ObjectPrivate name, as specified in the editor.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Name** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ObjectId Property

> This ObjectPrivate Id. Unique to this Scene.
>
> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Position Property

> The current position of the ObjectPrivate in world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **Position** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### RightVector Property

> The right vector of the ObjectPrivate in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **RightVector** { get; }
>
> **Value**
>
> > A normalized vector.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Rotation Property

> The current rotation of the ObjectPrivate in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Quaternion](/latest/script-api-docs/sansar-namespace/quarterion.md) **Rotation** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### TryGetComponent Generic Method

> Try to get a component of a particular type from this ObjectPrivate
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **TryGetComponent** ([uint](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.UInt32) index, *out* *ComponentClass* component)\
> where ComponentClass : class
>
> **Type Parameters**
>
> > *ComponentClass*
> >
> > The component type. [Sansar.Simulation.AnimationComponent](https://help.sansar.com/hc/en-us/articles/115003512907)[Sansar.Simulation.RigidBodyComponent](https://help.sansar.com/hc/en-us/articles/115003513667)
>
> **Parameters**
>
> > *index*
> >
> > The index of this component type to get. zero based index.
> >
> > *component*
> >
> > The component out parameter of the correct type to get.
>
> **Returns**
>
> > True if a component of the correct type at index is found, false otherwise.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### TryGetFirstComponent Generic Method

> Try to get the first component of a specific type on this ObjectPrivate
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **TryGetFirstComponent** (*out* *ComponentClass* component)\
> where ComponentClass : class
>
> **Type Parameters**
>
> > *ComponentClass*
> >
> > The component type. [Sansar.Simulation.AnimationComponent](https://help.sansar.com/hc/en-us/articles/115003512907) and [Sansar.Simulation.RigidBodyComponent](https://help.sansar.com/hc/en-us/articles/115003513667)
>
> **Parameters**
>
> > *component*
> >
> > Out parameter of the correct component type.
>
> **Returns**
>
> > Returns true if able to get a component of the correct type on this ObjectPrivate.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### UpVector Property

> The up vector of the ObjectPrivate in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **UpVector** { get; }
>
> **Value**
>
> > A normalized vector.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectPrivate.AddInteractionData Class

The result of AddInteraction request.

### Syntax

### Member Details

#### Interaction Property

> The interaction that was added.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Interaction](https://help.sansar.com/hc/en-us/articles/360000505123) **Interaction** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectPublic Class

The ObjectPublic class is a more limited subset of the [Sansar.Simulation.ObjectPrivate](https://help.sansar.com/hc/en-us/articles/115003361366) API for use by other scripts in the scene.

### Syntax

### Member Details

#### ForwardVector Property

> The forward vector of the ObjectPublic in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **ForwardVector** { get; }
>
> **Value**
>
> > A normalized vector.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### InitialPosition Property

> The position of the ObjectPublic in world frame before simulation started.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **InitialPosition** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### InitialRotation Property

> The rotation of the ObjectPublic in world frame before simulation started.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Quaternion](/latest/script-api-docs/sansar-namespace/quarterion.md) **InitialRotation** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Name Property

> This ObjectPublic name, as specified in the editor.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Name** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ObjectId Property

> This ObjectPublic Id. Unique to this Scene.
>
> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Position Property

> The current position of the ObjectPublic in world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **Position** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### RightVector Property

> The right vector of the ObjectPublic in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **RightVector** { get; }
>
> **Value**
>
> > A normalized vector.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Rotation Property

> The current rotation of the ObjectPublic in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Quaternion](/latest/script-api-docs/sansar-namespace/quarterion.md) **Rotation** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### UpVector Property

> The up vector of the ObjectPublic in the world frame.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **UpVector** { get; }
>
> **Value**
>
> > A normalized vector.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### ObjectScript Class

Extend SceneObjectScript to create a script that can be used on content that is rezzable in a scene.

### Syntax

### Member Details

#### ObjectScript Constructor

> This constructor is called before any properties have been set. Override [Sansar.Script.ScriptBase.Init()](https://help.sansar.com/hc/en-us/articles/115003549048#M:Sansar.Script.ScriptBase.Init\(\)) to initialize the script after properties have been set.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> protected **ObjectScript** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AllowedContexts Property

> Internal use only.
>
> #### Syntax
>
> **Value**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ObjectPrivate Property

> The ObjectPrivate this script is attached to if it is attached to an object.
>
> #### Syntax
>
> \[Sansar.Script.NonReflective]\
> \[get: Sansar.Script.Interface]\
> public [ObjectPrivate](https://help.sansar.com/hc/en-us/articles/115003361366) **ObjectPrivate** { protected get; set; }
>
> **Value**
>
> > The scene object this script is attached to if it is attached to an object, null otherwise.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ScenePublic Property

> Public scene information for the current scene.
>
> #### Syntax
>
> \[Sansar.Script.NonReflective]\
> \[get: Sansar.Script.Interface]\
> public [ScenePublic](https://help.sansar.com/hc/en-us/articles/115003342723) **ScenePublic** { protected get; set; }
>
> **Value**
>
> > The Scene this object is in.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***


---

# 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://docs.sansar.com/latest/script-api-docs/sansar-simulation-namespace/objective.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.
