Interface IInteractableBase<T>
Implement this interface into your own concrete type interactable for ease of use.
public interface IInteractableBase<T>
Type Parameters
T
Player component type argument
Methods
GetTitle(T)
Returns the title shown when player looks at the object. Run any custom logic here to determine the title. Returning null will exclude this object from showing up.
string GetTitle(T player)
Parameters
player
TReference to the interacting playerComponent
Returns
- string
Title to show when looking at object
OnInteract(T)
Called when player interacts with the object.
void OnInteract(T player)
Parameters
player
TReference to your playerController object.