Skip to content

API > Behaviour


Behaviour⚓︎

Behaviour inherits from Component

Behaviours are Components that can be enabled or disabled.

Members⚓︎

Properties⚓︎

Name Description
Behaviour.enabledProperty Enabled Behaviours are Updated, disabled Behaviours are not.
Behaviour.isActiveAndEnabledProperty Has the Behaviour had active and enabled called?

Inherited Members⚓︎

Inherited Properties⚓︎

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

Inherited Methods⚓︎

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