Skip to content

API > MLClickable


MLClickable⚓︎

MLClickable inherits from Component

MLClickable component’s Lua interface. Attaching this component makes objects clickable by player.

Members⚓︎

Properties⚓︎

Name Description
MLClickable.OnClickPropertyReadonly Property Event which will trigger when player clicks the object.
MLClickable.OnPointerEnterPropertyReadonly Property Event which will trigger when player’s pointer starts hovering over the object.
MLClickable.OnPointerExitPropertyReadonly Property Event which will trigger when player’s pointer stops hovering over the object.
MLClickable.ShowTextProperty Shows a text when player hover over the object.
MLClickable.TextProperty The text to be shown when player hovers over the object.

Inherited Members⚓︎

Inherited Properties⚓︎

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

Inherited Methods⚓︎

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