Skip to main content

InteractableEvents

A class in Root.Township, the global namespace.

Exposes an Interactable's interaction started and ended events as Unity events you can wire up in the inspector.

Constructors​

MemberWhat it is
InteractableEvents()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private Interactable interactableThe interactable on the same object.
private InteractableUnityEvent interactionEndedInvoked when an interaction ends.
private InteractableUnityEvent interactionStartedInvoked when an interaction starts.

Methods​

MemberWhat it is
void CopyEnd(UnityEventBase unityEventBase)Replaces the ended event with another one. Only takes effect if called before Awake.
void CopyStart(UnityEventBase unityEventBase)Replaces the started event with another one. Only takes effect if called before Awake.
1 private and internal method
MemberWhat it is
private void Awake()Hooks the Unity events to the interactable's InteractionStarted and InteractionEnded.