In my game when player stay inside the trigger, I have event OnTrigerStay and I have a variable:

void OnTriggerStay() {
    isInsideTrigger = true;
}

But when player teleports to another location, I can’t catch this event, because OnTriggerExit doesn’t works here. How can I check, when palyer doesn’t inside the trigger and make:

isInsideTrigger = false;

Here’s a few ways:

  1. Set isInsideTrigger to false inside one of the update methods (e.g. LateUpdate()). It will always reset back to true on the next frame if the player is still inside the trigger.

  2. Set isInsideTrigger to false during your teleporting method.

  3. have a separate bool on the player that changes when teleporting.