Skip to main content

Class InteractableOption

The interactable options that the can be selected by the interactor.

[Serializable]
public class InteractableOption

Inheritance​

Fields​

AutoComplete​

Whether the interaction should automatically complete without player input after helding input for the specified duration.

[Tooltip("If true, the interaction automatically completes without player input after helding input for the specified duration.")]
public bool AutoComplete

Field Value​

bool

CompletionPolicy​

What happens to the options once this one completes.

[Tooltip("What happens to the options once this one completes.")]
public OptionCompletionPolicy CompletionPolicy

Field Value​

OptionCompletionPolicy

Duration​

The duration of the interaction (in seconds). Set to 0 for instant interactions.

[Tooltip("The duration of the interaction in seconds. Set to 0 for instant interactions.")]
[Min(0)]
public float Duration

Field Value​

float

Index​

The option index

[NonSerialized]
public int Index

Field Value​

int

InteractEventCancel​

Event triggered when the interaction is canceled.

[Tooltip("Event triggered when the interaction is canceled.")]
public UnityEvent InteractEventCancel

Field Value​

UnityEvent

InteractEventComplete​

Event triggered when the interaction completes successfully.

[Tooltip("Event triggered when the interaction completes successfully.")]
public UnityEvent InteractEventComplete

Field Value​

UnityEvent

InteractEventStart​

Event triggered when the interaction starts.

[Tooltip("Event triggered when the interaction starts.")]
public UnityEvent InteractEventStart

Field Value​

UnityEvent

InteractEventUpdate​

Event triggered while the interaction is ongoing.

[Tooltip("Event triggered while the interaction is ongoing.")]
public UnityEvent InteractEventUpdate

Field Value​

UnityEvent

Prompt​

The prompt or message displayed to the player when interacting with the object.

[Tooltip("The prompt or message displayed to the player.")]
public string Prompt

Field Value​

string

  • Fields
    • AutoComplete
    • CompletionPolicy
    • Duration
    • Index
    • InteractEventCancel
    • InteractEventComplete
    • InteractEventStart
    • InteractEventUpdate
    • Prompt