LuaFileComponent
7/14/25About 1 min
[Obsolete] LuaFileComponent
Caution
The LuaFileComponent is Obsolete! 
Info
LuaFileComponent inherits from [Component](/docs/create/lua/API/Component/index.html)
Encapsulates the Lua Scripts when retrieved as a component.
Members
Properties
| Name | Description | 
|---|---|
| LuaFileComponent.script | 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.scriptName | The name of the Lua Script File (extension omitted) | 
Inherited Members
Inherited Properties
| Name | Description | 
|---|---|
| LuaFileComponent.gameObject | The game object this component is attached to. A component is always attached to a game object. | 
| LuaFileComponent.tag | The tag of this game object. | 
| LuaFileComponent.transform | The Transform attached to this GameObject. | 
| LuaFileComponent.hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? | 
| LuaFileComponent.name | The name of the object. | 
Inherited Methods
| Name | Description | 
|---|---|
| LuaFileComponent.BroadcastMessage(methodName, parameter=nil) | Calls the method named methodName on every Lua Script in this game object or any of its children. | 
| LuaFileComponent.CompareTag(tag) | Is this game object tagged with tag ? | 
| LuaFileComponent.GetAllLuaScripts() | Returns an array of all Lua scripts that attached to the game object. | 
| LuaFileComponent.GetComponent(type) | Returns the component of Type type if the game object has one attached, nil if it doesn't. | 
| LuaFileComponent.GetComponentInChildren(t) | Returns the component of Type type in the GameObject or any of its children using depth first search. | 
| LuaFileComponent.GetComponentInParent(t) | Returns the component of Type type in the GameObject or any of its parents. | 
| LuaFileComponent.GetComponents(type) | Returns all components of Type type in the GameObject. | 
| LuaFileComponent.GetComponentsInChildren(t) | Returns all components of Type type in the GameObject or any of its children. | 
| LuaFileComponent.GetComponentsInParent(t) | Returns all components of Type type in the GameObject or any of its parents. | 
| LuaFileComponent.SendMessage(methodName, value=nil) | Calls the method named methodName on every Lua Script in this game object. | 
| LuaFileComponent.SendMessageUpwards(methodName, value=nil) | Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour. | 
| LuaFileComponent.TryGetComponent(type) | Gets the component of the specified type, if it exists. | 
| LuaFileComponent.GetInstanceID() | Returns the instance id of the object. | 

