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.Properties¶
YaEntity entity
InteractableObject's entity.
ScanMode scanMode
The scanMode which interactableObject is scanned.
E.g. in function Interactor.OnObjectEnter(callback<InteractableObject>)
,
if interactor scans this interactableObject with ScanMode.PhysicsClient
,
the parameter interactableObject in callback<InteractableObject>
's scanMode will be ScanMode.PhysicsClient
Functions¶
Provides a callback that will be invoked when the interactor enters the interactive range.
Provides a callback that will be invoked when the interactor leaves the interactive range.
Provides a callback that will be invoked when the interactable object starts being interacted with.
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.