![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
Put this script on an object you want the player to be able to interact with. Put the function you want triggered when the player interacts in the InvokeOnInteract section in the Unity Editor. If you want the function to trigger after the interact button has been held for a certain amount of time, use the InvokeOnLongPress section. If you want the function to trigger when the player enters the interaction range, use the InvokeOnProximityEnter section. If you want the function to trigger every frame the player is still in the interaction range, use the InvokeOnProximityStay section. If you want the function to trigger when the player exits the interaction range, use the InvokeOnProximityExit section. If you want the function to trigger when the player melee attacks the object, use the InvokeOnMelee section.
Documentation updated 4/6/2025
Public Member Functions | |
void | triggerInteraction () |
Add the function you want to run when the player interacts with this object to this event in the Unity Editor. | |
void | triggerLongPress () |
If you want the function to run after a long press, add it to this event in the Unity Editor. | |
void | triggerProximityEnter () |
If you want the function to run when the player enters the interaction range, add it to this event in the Unity Editor. | |
void | triggerProximityStay () |
If you want the function to run when the player stays in interaction range, add it to this event in the Unity Editor. | |
void | triggerProximityExit () |
If you want the function to run when the player exits the interaction range, add it to this event in the Unity Editor. | |
void | triggerMelee () |
If you want the function to run after the object is meleed, add it to this event in the Unity Editor. | |
Public Attributes | |
UnityEvent | InvokeOnInteract |
Invokes any functions added to the InvokeOnInteract event. | |
UnityEvent | InvokeOnLongPress |
Invokes any functions added to the InvokeOnLongPress event. | |
UnityEvent | InvokeOnProximityEnter |
Invokes any functions added to the InvokeOnProximityEnter event. | |
UnityEvent | InvokeOnProximityStay |
Invokes any functions added to the InvokeOnProximityStay event. | |
UnityEvent | InvokeOnProximityExit |
Invokes any functions added to the InvokeOnProximityExit event. | |
UnityEvent | InvokeOnMelee |
Invokes any functions added to the InvokeOnMelee event. | |
void ObjectInteractable.triggerInteraction | ( | ) |
Add the function you want to run when the player interacts with this object to this event in the Unity Editor.
void ObjectInteractable.triggerLongPress | ( | ) |
If you want the function to run after a long press, add it to this event in the Unity Editor.
void ObjectInteractable.triggerMelee | ( | ) |
If you want the function to run after the object is meleed, add it to this event in the Unity Editor.
void ObjectInteractable.triggerProximityEnter | ( | ) |
If you want the function to run when the player enters the interaction range, add it to this event in the Unity Editor.
void ObjectInteractable.triggerProximityExit | ( | ) |
If you want the function to run when the player exits the interaction range, add it to this event in the Unity Editor.
void ObjectInteractable.triggerProximityStay | ( | ) |
If you want the function to run when the player stays in interaction range, add it to this event in the Unity Editor.
UnityEvent ObjectInteractable.InvokeOnInteract |
Invokes any functions added to the InvokeOnInteract event.
UnityEvent ObjectInteractable.InvokeOnLongPress |
Invokes any functions added to the InvokeOnLongPress event.
UnityEvent ObjectInteractable.InvokeOnMelee |
Invokes any functions added to the InvokeOnMelee event.
UnityEvent ObjectInteractable.InvokeOnProximityEnter |
Invokes any functions added to the InvokeOnProximityEnter event.
UnityEvent ObjectInteractable.InvokeOnProximityExit |
Invokes any functions added to the InvokeOnProximityExit event.
UnityEvent ObjectInteractable.InvokeOnProximityStay |
Invokes any functions added to the InvokeOnProximityStay event.