Skip to content

API > LuaFileComponent


[Obsolete] LuaFileComponent⚓︎

The LuaFileComponent is Obsolete!

LuaFileComponent inherits from Component

Encapsulates the Lua Scripts when retrieved as a component.

Members⚓︎

Properties⚓︎

Name Description
LuaFileComponent.scriptProperty The script object references the Lua script that is attached to the game object. From the script, you access the underlying game object and the callback functions.
LuaFileComponent.scriptNameProperty The name of the Lua Script File (extension omitted)

Inherited Members⚓︎

Inherited Properties⚓︎

Name Description
LuaFileComponent.gameObjectPropertyReadonly Property The game object this component is attached to. A component is always attached to a game object.
LuaFileComponent.tagPropertyReadonly Property The tag of this game object.
LuaFileComponent.transformPropertyReadonly Property The Transform attached to this GameObject.
LuaFileComponent.hideFlagsProperty Should the object be hidden, saved with the Scene or modifiable by the user?
LuaFileComponent.nameProperty The name of the object.

Inherited Methods⚓︎

Name Description
LuaFileComponent.BroadcastMessage(methodName, parameter=nil)Method Calls the method named methodName on every Lua Script in this game object or any of its children.
LuaFileComponent.CompareTag(tag)Method Is this game object tagged with tag ?
LuaFileComponent.GetAllLuaScripts()Method Returns an array of all Lua scripts that attached to the game object.
LuaFileComponent.GetComponent(type)Method Returns the component of Type type if the game object has one attached, nil if it doesn't.
LuaFileComponent.GetComponentInChildren(t)Method Returns the component of Type type in the GameObject or any of its children using depth first search.
LuaFileComponent.GetComponentInParent(t)Method Returns the component of Type type in the GameObject or any of its parents.
LuaFileComponent.GetComponents(type)Method Returns all components of Type type in the GameObject.
LuaFileComponent.GetComponentsInChildren(t)Method Returns all components of Type type in the GameObject or any of its children.
LuaFileComponent.GetComponentsInParent(t)Method Returns all components of Type type in the GameObject or any of its parents.
LuaFileComponent.SendMessage(methodName, value=nil)Method Calls the method named methodName on every Lua Script in this game object.
LuaFileComponent.SendMessageUpwards(methodName, value=nil)Method Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
LuaFileComponent.TryGetComponent(type)Method Gets the component of the specified type, if it exists.
LuaFileComponent.GetInstanceID()Method Returns the instance id of the object.