Skip to content

PhysicalObject Events

morzzic edited this page Jan 30, 2021 · 6 revisions

PhysicalObject has multiple events:

  • OnUse - Called when the object is being used.
  • OnUseUpdate - Called every frame when the object is in use.
  • OnEndUse - Called when the object ends.

Example

gameObject.GetComponent<PhysicalObject>().OnUse += () =>
{
  Debug.Log("Use");
};

Clone this wiki locally