ScriptBase

ScriptBase Class

Base class for all scripts, has ScriptHandle accessors and coroutine utilities.

Syntax

public abstract class ScriptBase

Remarks

This abstract class manages shared information for all script types.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from object.

Public Constructors

  Constructor

Public Properties

  Log Log . Gets the script console.
  Memory Memory . Memory information for the pool this script is in.
  Script ScriptHandle . Script handle to this script.

Public Methods

abstract
Init ()
Init() is called after all interfaces have been initialized.

Protected Methods

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

Member Details

ScriptBase Constructor

Constructor

Syntax

public ScriptBase ()

Remarks

Initializes a new instance of the ScriptBase class.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Init Method

Init() is called after all interfaces have been initialized.

Syntax

public abstract void Init ()

Remarks

Override Init() to set up script subscriptions and callbacks. Any members set before Init is called (such as in a script constructor) may be overwritten before Init is called.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Log Property

Gets the script console.

Syntax

public Log Log { protected get; set; }

Value

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Memory Property

Memory information for the pool this script is in.

Syntax

public Memory Memory { protected get; set; }

Value

Remarks

Scripts are pooled by their owner and share memory. Use this object to get events on nearing memory limits as well as get information on memory activity and use.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Script Property

Script handle to this script.

Syntax

public ScriptHandle Script { protected get; set; }

Value

An opaque type used by certain API methods.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

StartCoroutine Method

Starts a coroutine on the current script.

Syntax

protected void StartCoroutine (Action coroutine)

Parameters

coroutine
The coroutine to run.

Remarks

A coroutine can call ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.UInt64>) to block while waiting for events to return.

The following three scripts acccomplish the same goal using event subscriptions and coroutines. Each script will listen for new agents to join the scene and keep track of the agents name and the time it joined. When the agent leaves, its name and the duration of its visit will be reported.

C# Example
/* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License.
 * When using this content, you must:
 * �    Acknowledge that the content is from the Sansar Knowledge Base.
 * �    Include our copyright notice: "� 2017 Linden Research, Inc."
 * �    Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License.
 * �    Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode.
 * For example:
 * "This work uses content from the Sansar Knowledge Base. � 2017 Linden Research, Inc. Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)."
 */

/* Track visitors to the scene with the AddUser and RemoveUser events.
 */
using System;
using Sansar.Script;
using Sansar.Simulation;
using System.Collections.Generic;

public class EventExample : SceneObjectScript
{
    // Dictionary to keep track of join times with names
    Dictionary<SessionId,Tuple<string,DateTime>> userMap = new Dictionary<SessionId, Tuple<string,DateTime>>();

    public override void Init()
    {
        // Subscribe to Add User events
        ScenePrivate.User.Subscribe(User.AddUser, AddUser);

        // Subscribe to Remove User Events
        ScenePrivate.User.Subscribe(User.RemoveUser, RemoveUser);
    }

    // This event will occur once each time a new agent joins the scene
    void AddUser(string Action, SessionId User, string Data)
    {        
        // Track joined time
        DateTime joined = DateTime.Now;

        // Lookup the name of the agent. This is looked up now since the agent cannot be retrieved after they
        // leave the scene.
        string name = ScenePrivate.FindAgent(User).AgentInfo.Name;

        // Store the information to 
        userMap[User] = Tuple.Create(name,joined);
    }

    // This event will occur once each time an agent leaves the scene
    void RemoveUser(string Action, SessionId User, string Data)
    {
        // Retrieve the stored name and join time
        Tuple<string,DateTime> info = userMap[User];
        string name = info.Item1;
        DateTime joined = info.Item2;

        // Calculate elapsed time and report.
        TimeSpan elapsed = DateTime.Now-joined;
        ScenePrivate.Chat.MessageAllUsers(string.Format("{0} was present for {1} seconds", name, elapsed.TotalSeconds));

        // Remove tracking info for the agent who left
        userMap.Remove(User);
    }
}

Event handlers are useful when there is a well contained bit of code which can get most or all of its state from the Sansar.Script.EventData it receives. In this example, a separate data structure is needed to keep track of the name and join time for each agent since there could be multiple agents in the scene.

C# Example
/* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License.
 * When using this content, you must:
 * �    Acknowledge that the content is from the Sansar Knowledge Base.
 * �    Include our copyright notice: "� 2017 Linden Research, Inc."
 * �    Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License.
 * �    Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode.
 * For example:
 * "This work uses content from the Sansar Knowledge Base. � 2017 Linden Research, Inc. Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)."
 */

/* Use a coroutine to wait for event callbacks to track visitors to a scene.
 * For every visitor start a new coroutine to track that visitor's time.
 */
using System;
using Sansar.Script;
using Sansar.Simulation;


// This example shows how to use coroutines to track agents entering and leaving the scene
public class CoroutineExample : SceneObjectScript
{
    public override void Init()
    {
        StartCoroutine(TrackNewUsers);
    }

    // Wait for new users and start a new coroutine to time them.
    void TrackNewUsers()
    {
        // This coroutine will run for the lifetime of the script.
        while (true)
        {
            // Block until an add user event happens
            UserData data = (UserData)WaitFor(ScenePrivate.User.Subscribe, User.AddUser, SessionId.Invalid);

            // Start a new coroutine to track the new user
            // Each coroutine will run cooperatively with the others, this script, and other scripts in the system
            StartCoroutine(TrackUser, data.User);
        }
    }

    // There will be one instance of this coroutine per active user in the scene
    void TrackUser(SessionId userId)
    {
        // Track joined time
        DateTime joined = DateTime.Now;

        // Lookup the name of the agent. This is looked up now since the agent cannot be retrieved after they
        // leave the scene.
        string name = ScenePrivate.FindAgent(userId).AgentInfo.Name;

        // Block until the agent leaves the scene
        WaitFor(ScenePrivate.User.Subscribe, User.RemoveUser, userId);

        // Calculate elapsed time and report.
        TimeSpan elapsed = DateTime.Now-joined;
        ScenePrivate.Chat.MessageAllUsers(string.Format("{0} was present for {0} seconds", name, elapsed.TotalSeconds));
    }
}

While the amount of code is approximately the same for each, the coroutine version does not require access to any member data, simplifying the tracking by moving all the required information to stack variables.

C# Example
/* This content is licensed under the terms of the Creative Commons Attribution 4.0 International License.
 * When using this content, you must:
 * �    Acknowledge that the content is from the Sansar Knowledge Base.
 * �    Include our copyright notice: "� 2017 Linden Research, Inc."
 * �    Indicate that the content is licensed under the Creative Commons Attribution-Share Alike 4.0 International License.
 * �    Include the URL for, or link to, the license summary at https://creativecommons.org/licenses/by-sa/4.0/deed.hi (and, if possible, to the complete license terms at https://creativecommons.org/licenses/by-sa/4.0/legalcode.
 * For example:
 * "This work uses content from the Sansar Knowledge Base. � 2017 Linden Research, Inc. Licensed under the Creative Commons Attribution 4.0 International License (license summary available at https://creativecommons.org/licenses/by/4.0/ and complete license terms available at https://creativecommons.org/licenses/by/4.0/legalcode)."
 */

/* Use a coroutine as an event callback to easily track visitors to a scene.
 * Every visitor triggers an AddUser event which will start a coroutine for that visitor.
 */
using System;
using Sansar.Script;
using Sansar.Simulation;


// This example shows how to use coroutines and events to track agents entering and leaving the scene
public class CoroutineEventExample : SceneObjectScript
{
    public override void Init()
    {
        // Subscribe to Add User events
        // Events can be handled by anonymous methods
        ScenePrivate.User.Subscribe(User.AddUser, (action, user, data) => StartCoroutine(TrackUser, user), true);
    }


    // There will be one instance of this coroutine per active user in the scene
    void TrackUser(SessionId userId)
    {
        // Track joined time
        DateTime joined = DateTime.Now;

        // Lookup the name of the agent. This is looked up now since the agent cannot be retrieved after they
        // leave the scene.
        string name = ScenePrivate.FindAgent(userId).AgentInfo.Name;

        // Block until the agent leaves the scene
        WaitFor(ScenePrivate.User.Subscribe, User.RemoveUser, userId);

        // Calculate elapsed time and report.
        TimeSpan elapsed = DateTime.Now-joined;
        ScenePrivate.Chat.MessageAllUsers(string.Format("{0} was present for {0} seconds", name, elapsed.TotalSeconds));
    }
}

Coroutines can be mixed with event handlers. This example uses an event handler for the new user events to start a coroutine to watch for the remove user events.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

StartCoroutine<T> Generic Method

Starts a coroutine on the current script.

Syntax

protected void StartCoroutine<T> (Action<T> coroutine, T arg1)

Type Parameters

T
Type of the first parameter to pass to the coroutine when it is run. This can usually be derived from the Action.

Parameters

coroutine
The coroutine to run.
arg1
First parameter to pass to the coroutine when it is run.

Remarks

A coroutine can call ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.UInt64>) to block while waiting for events to return. See ScriptBase.StartCoroutine(Action) for an extended example.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

StartCoroutine<T,T1> Generic Method

Starts a coroutine on the current script.

Syntax

protected void StartCoroutine<T, T1> (Action<T, T1> coroutine, T arg1, T1 arg2)

Type Parameters

T
Type of the first parameter to pass to the coroutine when it is run. This can usually be derived from the Action.
T1
Type of the second parameter to pass to the coroutine when it is run. This can usually be derived from the Action.

Parameters

coroutine
The coroutine to run.
arg1
First parameter to pass to the coroutine when it is run.
arg2
Second parameter to pass to the coroutine when it is run.

Remarks

A coroutine can call ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.UInt64>) to block while waiting for events to return. See ScriptBase.StartCoroutine(Action) for an extended example.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

StartCoroutine<T,T1,T2> Generic Method

Starts a coroutine on the current script.

Syntax

protected void StartCoroutine<T, T1, T2> (Action<T, T1, T2> coroutine, T arg1, T1 arg2, T2 arg3)

Type Parameters

T
Type of the first parameter to pass to the coroutine when it is run. This can usually be derived from the Action.
T1
Type of the second parameter to pass to the coroutine when it is run. This can usually be derived from the Action.
T2
Type of the third parameter to pass to the coroutine when it is run. This can usually be derived from the Action.

Parameters

coroutine
The coroutine to run.
arg1
First parameter to pass to the coroutine when it is run.
arg2
Second parameter to pass to the coroutine when it is run.
arg3
Third parameter to pass to the coroutine when it is run.

Remarks

A coroutine can call ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.UInt64>) to block while waiting for events to return. See ScriptBase.StartCoroutine(Action) for an extended example.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

StartCoroutine<T,T1,T2,T3> Generic Method

Starts a coroutine on the current script.

Syntax

protected void StartCoroutine<T, T1, T2, T3> (Action<T, T1, T2, T3> coroutine, T arg1, T1 arg2, T2 arg3, T3 arg4)

Type Parameters

T
Type of the first parameter to pass to the coroutine when it is run. This can usually be derived from the Action.
T1
Type of the second parameter to pass to the coroutine when it is run. This can usually be derived from the Action.
T2
Type of the third parameter to pass to the coroutine when it is run. This can usually be derived from the Action.
T3
Type of the fourth parameter to pass to the coroutine when it is run. This can usually be derived from the Action.

Parameters

coroutine
The coroutine to run.
arg1
First parameter to pass to the coroutine when it is run.
arg2
Second parameter to pass to the coroutine when it is run.
arg3
Third parameter to pass to the coroutine when it is run.
arg4
Fourth parameter to pass to the coroutine when it is run.

Remarks

A coroutine can call ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.UInt64>) to block while waiting for events to return. See ScriptBase.StartCoroutine(Action) for an extended example.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Terminate Method

Terminates this script immediately.

Syntax

protected void Terminate (string message)

Parameters

message
The message to write to the log.

Remarks

This method does not return.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Wait Method

Delays execution of the current coroutine for the specified time.

Syntax

protected void Wait (TimeSpan duration)

Parameters

duration
The length of time to wait before continuing.

Remarks

Throws Sansar.Script.CoroutineException if not called from a coroutine context.

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor Method

Use in a coroutine to pause the script until an event happens.

Syntax

Parameters

func
The event-generating API to wait for.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<ARG1> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected EventData WaitFor<ARG1> (Action<ARG1, Action<Sansar.Script.EventData>,System.Boolean> func, ARG1 arg1)

Type Parameters

ARG1
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
arg1
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<T1> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

Type Parameters

T1
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
t1
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<ARG1,ARG2> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected EventData WaitFor<ARG1, ARG2> (Action<ARG1, ARG2, Action<Sansar.Script.EventData>,System.Boolean> func, ARG1 arg1, ARG2 arg2)

Type Parameters

ARG1
The type of the argument to func.
ARG2
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
arg1
An argument to func.
arg2
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<T1,T2> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

Type Parameters

T1
The type of the argument to func.
T2
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
t1
An argument to func.
t2
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<ARG1,ARG2,ARG3> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected EventData WaitFor<ARG1, ARG2, ARG3> (Action<ARG1, ARG2, ARG3, Action<Sansar.Script.EventData>,System.Boolean> func, ARG1 arg1, ARG2 arg2, ARG3 arg3)

Type Parameters

ARG1
The type of the argument to func.
ARG2
The type of the argument to func.
ARG3
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
arg1
An argument to func.
arg2
An argument to func.
arg3
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<T1,T2,T3> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected OperationCompleteEvent WaitFor<T1, T2, T3> (Func<T1, T2, T3, Action<Sansar.Script.OperationCompleteEvent>,System.UInt64> func, T1 t1, T2 t2, T3 t3)

Type Parameters

T1
The type of the argument to func.
T2
The type of the argument to func.
T3
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
t1
An argument to func.
t2
An argument to func.
t3
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<ARG1,ARG2,ARG3,ARG4> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected EventData WaitFor<ARG1, ARG2, ARG3, ARG4> (Action<ARG1, ARG2, ARG3, ARG4, Action<Sansar.Script.EventData>,System.Boolean> func, ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4)

Type Parameters

ARG1
The type of the argument to func.
ARG2
The type of the argument to func.
ARG3
The type of the argument to func.
ARG4
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
arg1
An argument to func.
arg2
An argument to func.
arg3
An argument to func.
arg4
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<T1,T2,T3,T4> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected OperationCompleteEvent WaitFor<T1, T2, T3, T4> (Func<T1, T2, T3, T4, Action<Sansar.Script.OperationCompleteEvent>,System.UInt64> func, T1 t1, T2 t2, T3 t3, T4 t4)

Type Parameters

T1
The type of the argument to func.
T2
The type of the argument to func.
T3
The type of the argument to func.
T4
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
t1
An argument to func.
t2
An argument to func.
t3
An argument to func.
t4
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

WaitFor<ARG1,ARG2,ARG3,ARG4,ARG5> Generic Method

Use in a coroutine to pause the script until an event happens.

Syntax

protected EventData WaitFor<ARG1, ARG2, ARG3, ARG4, ARG5> (Action<ARG1, ARG2, ARG3, ARG4, ARG5, Action<Sansar.Script.EventData>,System.Boolean> func, ARG1 arg1, ARG2 arg2, ARG3 arg3, ARG4 arg4, ARG5 arg5)

Type Parameters

ARG1
The type of the argument to func.
ARG2
The type of the argument to func.
ARG3
The type of the argument to func.
ARG4
The type of the argument to func.
ARG5
The type of the argument to func.

Parameters

func
The event-generating API to wait for.
arg1
An argument to func.
arg2
An argument to func.
arg3
An argument to func.
arg4
An argument to func.
arg5
An argument to func.

Returns

An EventData that can be case to type corresponding to the event type of func.

Remarks

 

Requirements

Namespace: Sansar.Script
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.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.