K
K
kokapuk2021-04-12 15:36:19
Unity
kokapuk, 2021-04-12 15:36:19

When an object is destroyed, OnTriggerExit does not work?

Hello, there is a button in my game, it is a trigger, when someone enters it, it is pressed and a certain action is triggered, and if it exits, it is released and the action is canceled, so if some object in the button is destroyed, the button will remain pressed, how can this be fixed without a bunch of crutches?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Almost, 2021-04-12
@kokapuk

Add an event call to the object 's OnDestroy .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question