Skip to content

InteractableObject

This InteractableObject struct contains a set of functions for dealing with interactable objects. Before you use this API, attach the yahaha.UI_Interact community component to the object.

Functions

void OnInteractorEnter(function callback<Interactor>)
Provides a callback that will be invoked when the interactor enters the interactive range.
void OnInteractorLeave(function callback<Interactor>)
Provides a callback that will be invoked when the interactor leaves the interactive range.
void OnInteractionStart(function callback<Interactor, number>)
Provides a callback that will be invoked when the interactable object starts being interacted with.
void OnInteractionStop(function callback<Interactor, number>)
Provides a callback that will be invoked when the interactable object stops being interacted with.
void SetEnable(boolean enable)
Set this interactable object is enable or not.
void SetEnable(boolean enable, number pointId)
Set specified interactable point on this interactable object with pointId to enable or not.