NET:LavishScriptAPI.LavishScript.Objects.GetObject

From Lavish Software Wiki
Jump to: navigation, search

Overview

Used to retrieve a LavishScriptObject object from a LavishScript Top-Level Object.

Reference Library

Lavish.InnerSpace.dll

Fully Qualified Name

LavishScriptAPI.LavishScript.Objects.GetObject

Declaration

static public LavishScriptObject GetObject(string Name)
static public LavishScriptObject GetObject(string Name, params string[] indices)

Parameters

  • string Name
Name of the LavishScript Top-Level Object to access
  • string[] indices
Parameters, if any, to pass to the LavishScript Top-Level Object for dynamic retrieval

Return Value

The requested object, or null

Examples

C#

Frame.Lock();
LavishScriptObject Obj = LavishScript.Objects.GetObject("LavishScript");
if (Obj == null)
{
    InnerSpace.Echo("object not found");
}
else
{
    /* "LavishScript" object's ToString value is its version number, which follows the form of a typical float */
    float Version = Obj.GetValue<float>();
    InnerSpace.Echo("LavishScript Version " + Version.ToString());
}
Frame.Unlock();

See Also