# Scene Public

### ScenePublic Class

### Syntax

### Member Details

#### AgentCount Property

> The number of agents in the Scene.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [uint](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.UInt32) **AgentCount** { get; }
>
> **Value**
>
> > Unsigned integer count of the number of agents in the Scene.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Chat Property

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

#### FindAgent Method

> Looks up an AgentInfo associated with the given object id.
>
> #### Syntax
>
> **Parameters**
>
> > *objectId*
> >
> > The object to find.
>
> **Returns**
>
> > The AgentInfo, or null if an agent cannot be found with that id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### FindAgent Method

> Looks up an AgentInfo associated with the given session id, if they are in the scene.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the agent to find.
>
> **Returns**
>
> > The AgentInfo, or null if an agent cannot be found with that id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### FindAgent Method

> Looks up an AgentInfo associated with the given persona id, if they are in the scene.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [AgentPublic](https://help.sansar.com/hc/en-us/articles/115003454746) **FindAgent** ([Guid](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Guid) personaId)
>
> **Parameters**
>
> > *personaId*
> >
> > The personaId of the agent to find.
>
> **Returns**
>
> > The agent, or null if an agent cannot be found with that id in the scene.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### FindObject Method

> Looks up a Object associated with the given object id.
>
> #### Syntax
>
> **Parameters**
>
> > *objectId*
> >
> > The object to find.
>
> **Returns**
>
> > The ObjectPublic, or null if a Object cannot be found with that id.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### FindReflective Generic Method

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

#### GetAgent Method

> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [AgentPublic](https://help.sansar.com/hc/en-us/articles/115003454746) **GetAgent** ([uint](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.UInt32) index)
>
> **Parameters**
>
> > *index*
> >
> > The index of the agent to get.
>
> **Returns**
>
> > Returns null if the index is larger than the number of agents in the Scene.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetAgents Method

> Returns the current list of Agents in the Scene.
>
> #### Syntax
>
> **Returns**
>
> > The current list of agents in the Scene
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetPortalCreatorName Method

> The name of the user who created the specified portal.
>
> #### Syntax
>
> **Parameters**
>
> > *objectId*
> >
> > Documentation for this section has not yet been entered.
>
> **Returns**
>
> > String
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetPortalDescription Method

> Description for the specified portal.
>
> #### Syntax
>
> **Parameters**
>
> > *objectId*
> >
> > Documentation for this section has not yet been entered.
>
> **Returns**
>
> > String
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetPortalUri Method

> URI destination for the specified portal.
>
> #### Syntax
>
> **Parameters**
>
> > *objectId*
> >
> > Documentation for this section has not yet been entered.
>
> **Returns**
>
> > String
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SceneInfo Property

> Gets the SceneInfo for this Scene
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [SceneInfo](https://help.sansar.com/hc/en-us/articles/115003629608) **SceneInfo** { get; }
>
> **Value**
>
> > The full SceneInfo Api
>
> #### 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
>
> ***

#### User Property

> Gets the User interface for this Scene
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [User](https://help.sansar.com/hc/en-us/articles/115004908927) **User** { get; }
>
> **Value**
>
> > The User Api
>
> #### 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/scene-public.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.
