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]
 
SceneInfo SceneInfo . Gets the SceneInfo for this Scene
[read-only]
 
ScenePrivate ScenePrivate . BETA HACK: Get a Scene API from a SceneInfo. This is an escalation of privileges!
[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.
  GetAgent (uint) : AgentPublic
Get an Sansar.Simulation.AgentPublic for a specific agent in the Scene.
  GetAgents () : IEnumerable<AgentPublic>
Enumerable for GetAgent

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

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

Enumerable for GetAgent

Syntax

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

Returns

Enumerable for GetAgent

Remarks

The resulting enumerable may be invalidated if the underlying collection changes.

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

ScenePrivate Property

BETA HACK: Get a Scene API from a SceneInfo. This is an escalation of privileges!

Syntax

[get: Sansar.Script.Interface(Restricted=true)]
public ScenePrivate ScenePrivate { get; }

Value

The full Scene API

Remarks

Do not use, instead use SceneObjectScript.ScenePrivate directly.

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.