SceneObjectScript

Sansar.Simulation.SceneObjectScript

SceneObjectScript Class

Extend SceneObjectScript to create a script that can be used on content that is natively in the scene. This is the primary script type in Sansar.

Syntax

[Sansar.Script.Interface]
public abstract class SceneObjectScript : Sansar.Script.ScriptBase

Remarks

Override Sansar.Script.ScriptBase.Init() for script initialization, primarily event subscriptions.

Use SceneObjectScript.ObjectPrivate to access the Object the script is on.

Use SceneObjectScript.ScenePrivate to access the Scene the object is in.

C# Example
              

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

Protected Constructors

  This constructor is called before any properties have been set. Override Sansar.Script.ScriptBase.Init() to initialize the script after properties have been set.

Public Properties

  Log Sansar.Script.Log . Gets the script console. (Inherited from Sansar.Script.ScriptBase.)
  Memory Sansar.Script.Memory . Memory information for the pool this script is in. (Inherited from Sansar.Script.ScriptBase.)
  ObjectPrivate ObjectPrivate . The ObjectPrivate this script is attached to if it is attached to an object.
  ScenePrivate ScenePrivate . The Scene API for the Scene this script is a part of if the script is attached to scene content.
  Script Sansar.Script.ScriptHandle . Script handle to this script. (Inherited from Sansar.Script.ScriptBase.)

Public Methods

abstract
Init ()
Init() is called after all interfaces have been initialized. (Inherited from Sansar.Script.ScriptBase.)

Protected Methods

  StartCoroutine (Action)
Starts a coroutine on the current script. (Inherited from Sansar.Script.ScriptBase.)
  StartCoroutine<T> (Action<T>, T)
Starts a coroutine on the current script. (Inherited from Sansar.Script.ScriptBase.)
  StartCoroutine<T,T1> (Action<T, T1>, T, T1)
Starts a coroutine on the current script. (Inherited from Sansar.Script.ScriptBase.)
  StartCoroutine<T,T1,T2> (Action<T, T1, T2>, T, T1, T2)
Starts a coroutine on the current script. (Inherited from Sansar.Script.ScriptBase.)
  StartCoroutine<T,T1,T2,T3> (Action<T, T1, T2, T3>, T, T1, T2, T3)
Starts a coroutine on the current script. (Inherited from Sansar.Script.ScriptBase.)
  Terminate (string)
Terminates this script immediately. (Inherited from Sansar.Script.ScriptBase.)
  Wait (TimeSpan)
Delays execution of the current coroutine for the specified time. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor (Action<Action<Sansar.Script.EventData>,System.Boolean>) : Sansar.Script.EventData
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<ARG1> (Action<ARG1, Action<Sansar.Script.EventData>,System.Boolean>, ARG1) : Sansar.Script.EventData
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<T1> (Func<T1, Action<Sansar.Script.OperationCompleteEvent>,System.UInt64>, T1) : Sansar.Script.OperationCompleteEvent
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<ARG1,ARG2> (Action<ARG1, ARG2, Action<Sansar.Script.EventData>,System.Boolean>, ARG1, ARG2) : Sansar.Script.EventData
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<T1,T2> (Func<T1, T2, Action<Sansar.Script.OperationCompleteEvent>,System.UInt64>, T1, T2) : Sansar.Script.OperationCompleteEvent
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<ARG1,ARG2,ARG3> (Action<ARG1, ARG2, ARG3, Action<Sansar.Script.EventData>,System.Boolean>, ARG1, ARG2, ARG3) : Sansar.Script.EventData
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<T1,T2,T3> (Func<T1, T2, T3, Action<Sansar.Script.OperationCompleteEvent>,System.UInt64>, T1, T2, T3) : Sansar.Script.OperationCompleteEvent
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<ARG1,ARG2,ARG3,ARG4> (Action<ARG1, ARG2, ARG3, ARG4, Action<Sansar.Script.EventData>,System.Boolean>, ARG1, ARG2, ARG3, ARG4) : Sansar.Script.EventData
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<T1,T2,T3,T4> (Func<T1, T2, T3, T4, Action<Sansar.Script.OperationCompleteEvent>,System.UInt64>, T1, T2, T3, T4) : Sansar.Script.OperationCompleteEvent
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)
  WaitFor<ARG1,ARG2,ARG3,ARG4,ARG5> (Action<ARG1, ARG2, ARG3, ARG4, ARG5, Action<Sansar.Script.EventData>,System.Boolean>, ARG1, ARG2, ARG3, ARG4, ARG5) : Sansar.Script.EventData
Use in a coroutine to pause the script until an event happens. (Inherited from Sansar.Script.ScriptBase.)

Member Details

SceneObjectScript Constructor

This constructor is called before any properties have been set. Override Sansar.Script.ScriptBase.Init() to initialize the script after properties have been set.

Syntax

[Sansar.Script.Interface]
protected SceneObjectScript ()

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

[get: Sansar.Script.Interface]
public ObjectPrivate ObjectPrivate { protected get; set; }

Value

The scene object this script is attached to if it is attached to an object, null otherwise.

Remarks

For AgentScripts this is the Agent's ObjectPrivate of their avatar.

Requirements

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

ScenePrivate Property

The Scene API for the Scene this script is a part of if the script is attached to scene content.

Syntax

[get: Sansar.Script.Interface]
public ScenePrivate ScenePrivate { protected get; set; }

Value

The Scene API for this scene if this script was attached to scene content, null otherwise.

Remarks

This value will be set before Init is called.

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.