Analog of OnEnable and OnDisable interaction
You may need to do some actions before or after using action, like in OnEnable and OnDisable. But by doing this for all interactions, in onEnable, may slow down game. For this, there are 2 events onSubscribed
and onUnsubscribed
.
onSubscribed
will work when interaction are caught by InteractionRaycaster
, and onUnsubscribed
when InteractionRaycaster
lose interaction from sight
Last updated