ScenePublic

ScenePublic Class

The Public Scene API, a more limited subset of Sansar.Simulation.ScenePrivate.

Syntax

[Sansar.Script.Interface]
public class ScenePublic : Sansar.Script.InstanceInterface

Remarks

 

Requirements

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

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Properties

[read-only]
 
AgentCount uint . The number of agents in the Scene.
[read-only]
 
Chat Chat . Gets the Chat interface for this Scene
[read-only]
 
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)
[read-only]
 
SceneInfo SceneInfo . Gets the SceneInfo for this Scene
[read-only]
 
User User . Gets the User interface for this Scene

Public Methods

 
FindAgent (Sansar.Script.ObjectId) : AgentPublic
Looks up an AgentInfo associated with the given object id.
 
FindAgent (Sansar.Script.SessionId) : AgentPublic
Looks up an AgentInfo associated with the given session id, if they are in the scene.
 
FindAgent (Guid) : AgentPublic
Looks up an AgentInfo associated with the given persona id, if they are in the scene.
 
FindReflective<TInterface> (string) : IEnumerable<TInterface>
Looks up Reflective objects in the scene that match the interface type by class name.
 
GetAgent (uint) : AgentPublic
Get an Sansar.Simulation.AgentPublic for a specific agent in the Scene.
 
GetAgents () : IEnumerable<AgentPublic>
Returns the current list of Agents in the Scene.
 
GetPortalCreatorName (Sansar.Script.ObjectId) : string
The name of the user who created the specified portal.
 
GetPortalDescription (Sansar.Script.ObjectId) : string
Description for the specified portal.
 
GetPortalUri (Sansar.Script.ObjectId) : string
URI destination for the specified portal.
override
ToString () : string
A string representation of this object.

Member Details

AgentCount Property

The number of agents in the Scene.

Syntax

[get: Sansar.Script.Interface]
public uint AgentCount { get; }

Value

Unsigned integer count of the number of agents in the Scene.

Remarks

This number changes when agents join and part.

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

[Sansar.Script.Interface]
public AgentPublic FindAgent (Sansar.Script.ObjectId objectId)

Parameters

objectId
The object to find.

Returns

The AgentInfo, or null if an agent cannot be found with that id.

Remarks

Agents may leave at any time. Attempting to use an Agent or AgentInfo interface for an agent no longer in the scene will throw a NullReferenceException.

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

[Sansar.Script.Interface]
public AgentPublic FindAgent (Sansar.Script.SessionId sessionId)

Parameters

sessionId
The sessionId of the agent to find.

Returns

The AgentInfo, or null if an agent cannot be found with that id.

Remarks

Agents may leave at any time. Attempting to use an Agent or AgentInfo interface for an agent no longer in the scene will throw a NullReferenceException.

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 FindAgent (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

Agents may leave at any time. Attempting to use an Agent or AgentInfo interface for an agent no longer in the scene will throw a NullReferenceException.

Requirements

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

FindReflective<TInterface> 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/<FindReflective>d__31`1))]
public IEnumerable<TInterface> FindReflective<TInterface> (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

The name given corresponds to the Type.FullName of the object. Multiple scripts may define unrelated types of the same name, but only registered objects that match the interface of TInterface will be returned.

Requirements

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

GetAgent Method

Get an Sansar.Simulation.AgentPublic for a specific agent in the Scene.

Syntax

[Sansar.Script.Interface]
public AgentPublic GetAgent (uint 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

Agents may appear at different indices as they join and part.

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

[Sansar.Script.Interface]
public IEnumerable<AgentPublic> GetAgents ()

Returns

The current list of agents in the Scene

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

GetPortalCreatorName Method

The name of the user who created the specified portal.

Syntax

[Sansar.Script.Interface]
public string GetPortalCreatorName (Sansar.Script.ObjectId objectId)

Parameters

objectId
Documentation for this section has not yet been entered.

Returns

String

Remarks

User who created the portal.

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

[Sansar.Script.Interface]
public string GetPortalDescription (Sansar.Script.ObjectId objectId)

Parameters

objectId
Documentation for this section has not yet been entered.

Returns

String

Remarks

The description of the portal.

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

[Sansar.Script.Interface]
public string GetPortalUri (Sansar.Script.ObjectId objectId)

Parameters

objectId
Documentation for this section has not yet been entered.

Returns

String

Remarks

The URI of the destination of the portal.

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 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 ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

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 User { get; }

Value

The User Api

Remarks

 

Requirements

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


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.