# Agent Info

### AgentInfo Class

The AgentInfo class has basic information and IDs for an agent.

### Syntax

### Member Details

#### AvatarUuid Property

> Returns the persona ID of the AgentInfo.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Guid](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Guid) **AvatarUuid** { get; }
>
> **Value**
>
> > The persona ID of the AgentInfo
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Handle Property

> Returns the handle of the AgentInfo.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Handle** { get; }
>
> **Value**
>
> > The handle of the AgentInfo
>
> #### Remarks
>
> Agent handles are unique.
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Name Property

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

#### ObjectId Property

> Returns the ObjectId of the AgentInfo.
>
> #### Syntax
>
> **Value**
>
> > The object ID of the AgentInfo
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Scale Property

> Returns the scale for the user.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **Scale** { get; }
>
> **Value**
>
> > The scale of the user
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SessionId Property

> Returns the Id of the AgentInfo.
>
> #### Syntax
>
> **Value**
>
> > The id of the AgentInfo
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Ticket Property

> Returns the ticket for the user if they purchased one.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **Ticket** { get; }
>
> **Value**
>
> > The ticket of the user
>
> #### 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
>
> ***

***

### AgentPrivate Class

The AgentPrivate class is the full interface for interactions with avatars.

### Syntax

### Member Details

#### AgentInfo Property

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

#### Client Property

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

#### GetControlPointEnabled Method

> Retrieves whether the control point is enabled.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **GetControlPointEnabled** ([ControlPointType](https://help.sansar.com/hc/en-us/articles/115004507483) type)
>
> **Parameters**
>
> > *type*
> >
> > See [Sansar.Simulation.ControlPointType](https://help.sansar.com/hc/en-us/articles/115004507483).
>
> **Returns**
>
> > True if the control point is enabled. Control points are enabled when used.
>
> **Exceptions**

| Type                                                                                          | Reason                                           |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [ArgumentException](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentException) | Thrown if an invalid control point is specified. |

> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetControlPointOrientation Method

> Retrieves the orientation in character relative space of the specified control point.
>
> #### Syntax
>
> **Parameters**
>
> > *type*
> >
> > See [Sansar.Simulation.ControlPointType](https://help.sansar.com/hc/en-us/articles/115004507483).
>
> **Returns**
>
> > The orientation of the control point.
>
> **Exceptions**

| Type                                                                                          | Reason                                           |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [ArgumentException](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentException) | Thrown if an invalid control point is specified. |

> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetControlPointPosition Method

> Retrieves the position in character relative space of the specified control point.
>
> #### Syntax
>
> **Parameters**
>
> > *type*
> >
> > The control point to get the position of. See [Sansar.Simulation.ControlPointType](https://help.sansar.com/hc/en-us/articles/115004507483).
>
> **Returns**
>
> > The position of the control point.
>
> **Exceptions**

| Type                                                                                          | Reason                                           |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [ArgumentException](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentException) | Thrown if an invalid control point is specified. |

> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetGravityFactor Method

> Retrieves what factor of the world's gravity is applied to this agent.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **GetGravityFactor** ()
>
> **Returns**
>
> > The gravity factor.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetHeldRigidBodies Method

> #### Syntax
>
> **Returns**
>
> > a list of [Sansar.Simulation.RigidBodyComponent](https://help.sansar.com/hc/en-us/articles/115003513667)
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### IgnoreCollisionWith Method

> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **IgnoreCollisionWith** ([RigidBodyComponent](https://help.sansar.com/hc/en-us/articles/115003513667) rigidBodyComponent, [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) ignoreBody)
>
> **Parameters**
>
> > *rigidBodyComponent*
> >
> > The RigidBodyComponent with which to change collision behavior.
> >
> > *ignoreBody*
> >
> > When true, collision will be added to the ignore list. When false, collision will removed from the ignore list.
>
> #### Remarks
>
> This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to [Sansar.Script.ScriptBase.WaitFor](https://help.sansar.com/hc/en-us/articles/115003549048#M:Sansar.Script.ScriptBase.WaitFor) while in a coroutine.
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### IgnoreCollisionWith Method

> #### Syntax
>
> **Parameters**
>
> > *rigidBodyComponent*
> >
> > The RigidBodyComponent with which to change collision behavior.
> >
> > *ignoreBody*
> >
> > When true, collision will be added to the ignore list. When false, collision will removed from the ignore list.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to [Sansar.Script.ScriptBase.WaitFor](https://help.sansar.com/hc/en-us/articles/115003549048#M:Sansar.Script.ScriptBase.WaitFor) while in a coroutine.
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### IsCollisionIgnoredWith Method

> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **IsCollisionIgnoredWith** ([RigidBodyComponent](https://help.sansar.com/hc/en-us/articles/115003513667) rigidBodyComponent)
>
> **Parameters**
>
> > *rigidBodyComponent*
> >
> > The RigidBodyComponent that could possibly be ignored.
>
> **Returns**
>
> > Documentation for this section has not yet been entered.
>
> #### Remarks
>
> Documentation for this section has not yet been entered.
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### OverrideAudioStream Method

> Overrides source of web audio streams.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **OverrideAudioStream** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) url)
>
> **Parameters**
>
> > *url*
> >
> > URL to use.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### OverrideAudioStream Method

> Overrides source of web audio streams.
>
> #### Syntax
>
> **Parameters**
>
> > *url*
> >
> > URL to use.
> >
> > *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
>
> ***

#### OverrideMediaSource Method

> Sets stream channel source.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **OverrideMediaSource** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) url)
>
> **Parameters**
>
> > *url*
> >
> > URL to use.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### OverrideMediaSource Method

> Overrides source of media surfaces.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **OverrideMediaSource** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) url, [int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) mediaWidth, [int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) mediaHeight)
>
> **Parameters**
>
> > *url*
> >
> > URL to use.
> >
> > *mediaWidth*
> >
> > (cMediaChannel only) source width.
> >
> > *mediaHeight*
> >
> > (cMediaChannel only) source height.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### OverrideMediaSource Method

> Overrides source of media surfaces.
>
> #### Syntax
>
> **Parameters**
>
> > *url*
> >
> > URL to use.
> >
> > *mediaWidth*
> >
> > (cMediaChannel only) source width.
> >
> > *mediaHeight*
> >
> > (cMediaChannel only) source height.
> >
> > *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
>
> ***

#### PerformMediaAction Method

> Performs a specific action on the current media surface.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **PerformMediaAction** ([MediaAction](https://help.sansar.com/hc/en-us/articles/360022875291) action)
>
> **Parameters**
>
> > *action*
> >
> > The action to perform.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### PerformMediaAction Method

> Performs a specific action on the current media surface.
>
> #### Syntax
>
> **Parameters**
>
> > *action*
> >
> > The action to perform.
> >
> > *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
>
> ***

#### PlaySound Method

> Play sound to direct output.
>
> #### Syntax
>
> **Parameters**
>
> > *soundResource*
> >
> > The sound resource to play.
> >
> > *playSettings*
> >
> > The play parameters.
>
> **Returns**
>
> > The play handle for controlling playback.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### PlaySoundAtPosition Method

> Play sound at specified position.
>
> #### Syntax
>
> **Parameters**
>
> > *soundResource*
> >
> > The sound resource to play.
> >
> > *position*
> >
> > The absolute position.
> >
> > *playSettings*
> >
> > The play parameters.
>
> **Returns**
>
> > The play handle for controlling playback.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### PlaySoundOnComponent Method

> Play sound on a component (and follows its position).
>
> #### Syntax
>
> **Parameters**
>
> > *soundResource*
> >
> > The sound resource to play.
> >
> > *audioComponent*
> >
> > The audio component to play this on.
> >
> > *playSettings*
> >
> > The play parameters.
>
> **Returns**
>
> > The play handle for controlling playback.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### PlayStream Method

> Play audio stream to direct output.
>
> #### Syntax
>
> **Parameters**
>
> > *streamChannel*
> >
> > Channel of the audio stream to play.
> >
> > *loudness*
> >
> > Relative loudness in dB.
>
> **Returns**
>
> > The play handle for controlling playback.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### PlayStreamAtPosition Method

> Play web audio stream at specified position.
>
> #### Syntax
>
> **Parameters**
>
> > *streamChannel*
> >
> > Channel of the audio stream to play.
> >
> > *position*
> >
> > The absolute position.
> >
> > *loudness*
> >
> > Relative loudness in dB.
>
> **Returns**
>
> > The play handle for controlling playback.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### PlayStreamOnComponent Method

> Play web audio stream on this component (and follow its position).
>
> #### Syntax
>
> **Parameters**
>
> > *streamChannel*
> >
> > Channel of the audio stream to play.
> >
> > *audioComponent*
> >
> > The audio component to play this on.
> >
> > *loudness*
> >
> > Relative loudness in dB.
>
> **Returns**
>
> > The play handle for controlling playback.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SendChat Method

> Sends a [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message to the $className$.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **SendChat** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message)
>
> **Parameters**
>
> > *message*
> >
> > The message to send.
>
> **Exceptions**

| Type                                                                                                    | Reason                            |
| ------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [NullReferenceException](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.NullReferenceException) | If the user is no longer online.  |
| [Sansar.Script.ThrottleException](https://help.sansar.com/hc/en-us/articles/115004507283)               | If the throttle rate is exceeded. |

> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SendChat Method

> Sends a [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message to the AgentPrivate.
>
> #### Syntax
>
> **Parameters**
>
> > *message*
> >
> > The message to send.
> >
> > *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
>
> ***

#### SetGravityFactor Method

> Sets what factor of the world's gravity is applied to this agent.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **SetGravityFactor** ([float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) gravityFactor)
>
> **Parameters**
>
> > *gravityFactor*
> >
> > The gravityFactor. Default value is 1, range is -2 to 2
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetGravityFactor Method

> Sets what factor of the world's gravity is applied to this agent.
>
> #### Syntax
>
> **Parameters**
>
> > *gravityFactor*
> >
> > The gravityFactor. Default value is 1, range is -2 to 2
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > The return value is an internal event id.
>
> #### 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
>
> ***

***

### AgentPublic Class

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

### Syntax

### Member Details

#### AgentInfo Property

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

#### SendChat Method

> Sends a [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message to the $className$.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **SendChat** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message)
>
> **Parameters**
>
> > *message*
> >
> > The message to send.
>
> **Exceptions**

| Type                                                                                                    | Reason                            |
| ------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [NullReferenceException](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.NullReferenceException) | If the user is no longer online.  |
| [Sansar.Script.ThrottleException](https://help.sansar.com/hc/en-us/articles/115004507283)               | If the throttle rate is exceeded. |

> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SendChat Method

> Sends a [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) message to the AgentPublic.
>
> #### Syntax
>
> **Parameters**
>
> > *message*
> >
> > The message to send.
> >
> > *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
>
> ***

#### 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
>
> ***

***

### AgentScript Class

Extend AgentScript to create a script to be attached directly to an agent. For future use: Sansar does not currently support adding scripts to agents.

### Syntax

### Member Details

#### AgentScript 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 **AgentScript** ()
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### AgentPrivate Property

> The Agent API for the agent this script is attached to.
>
> #### Syntax
>
> \[Sansar.Script.NonReflective]\
> \[get: Sansar.Script.Interface]\
> public [AgentPrivate](https://help.sansar.com/hc/en-us/articles/115003361386) **AgentPrivate** { protected get; set; }
>
> **Value**
>
> > The Agent this script is attached to if the script is on an avatar, null otherwise.
>
> #### 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

> Basic 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
>
> ***

***

#### Have more questions? Ask in our [Discord!](http://discord.gg/sansarofficial)
