All pages
Powered by GitBook
1 of 1

Loading...

SScriptingResources

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

GetResource

GetResource (string name)

Returns the SResource with the specified name, or else returns nil if not found.

Parameter
Type
Description

Properties

Enabled

bool Enabled get set

Return whether the ScriptingResources component is Enabled or not

Resources

SResource[] Resources get

Returns an array of all resources contained within this component.

GameObject

GameObject get

Property Description

SResource GetResource (string name)

bool Enabled get set

SResource[] Resources get

SGameObject GameObject get

SResource
SGameObject
resource = Space.Host.ExecutingObject.Resources.GetResource("ResourceName")
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
Space.Host.ExecutingObject.Resources.Enabled = true
arrayOfResources = Space.Host.ExecutingObject.Resources.Resources
theGameObject = Space.Host.ExecutingObject.Resources.GameObject