SScriptingResources
Index
Functions Index
| Function Name |
|---|
| SResource GetResource (string name) |
Properties Index
| Property Name |
|---|
bool Enabled get set |
SResource[] Resources get |
SGameObject GameObject get |
Functions
GetResource
SResource GetResource (string name)
Returns the SResource with the specified name, or else returns nil if not found.
| Parameter | Type | Description |
|---|---|---|
- Lua
resource = Space.Host.ExecutingObject.Resources.GetResource("ResourceName")
- Lua
local thisObject=Space.Host.ExecutingObject
local thisObjectResource=thisObject.Resources.GetResource("Test")
if thisObjectResource == nil then
Space.Log("That resource was not found.")
else
Space.Log("That resource exists and can be used.")
end
Properties
Enabled
bool Enabled get set
Return whether the ScriptingResources component is Enabled or not
- Lua
Space.Host.ExecutingObject.Resources.Enabled = true
Resources
SResource[] Resources get
Returns an array of all resources contained within this component.
- Lua
arrayOfResources = Space.Host.ExecutingObject.Resources.Resources
GameObject
SGameObject GameObject get
Property Description
- Lua
theGameObject = Space.Host.ExecutingObject.Resources.GameObject