NET:LavishScriptAPI.LavishScript.Objects.GetPermanentObject
Jump to navigation
Jump to search
Contents
Overview
Used to retrieve a permanent LavishScriptObject object from a LavishScript Top-Level Object. Permanent objects are exempt from post-frame cleanup. Do not use this function to retrieve a permanent reference to a non-permanent object. If the object may disappear at any point while the program is executing, the object is, by definition, temporary (i.e. not permanent).
Reference Library
Fully Qualified Name
- LavishScriptAPI.LavishScript.Objects.GetPermanentObject
- LavishScriptAPI namespace
- LavishScript class
- Objects class
- GetPermanentObject function
- Objects class
- LavishScript class
Declaration
static public LavishScriptObject GetPermanentObject(string Name)
Parameters
- string Name
- Name of the LavishScript Top-Level Object to access
Return Value
- The requested object, or null
Examples
C#
Frame.Lock(); LavishScriptObject Obj = LavishScript.Objects.GetPermanentObject("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();