- Home /
Cant Find Destruction Code?
My player is getting destroyed even if there is no collision. No other script is calling the player to be destroyed. Can someone help me. I can send any required information ASAP you may ask.
Answer by Bunny83 · Nov 22, 2020 at 12:25 PM
Well, have you placed a Debug.Log call inside OnDestroy and looked at the stack trace? AFAIK you should see from where it got destroyed (at least it terms of method calls).
Actually I already have a Die() function in my players script. I am calling it whenever I want my player to die. I already have written a Debug.Log("Death")
in my die function. But there is no death in my console window when my player dies for no reason. So the scripts calling the die function aren't destroying my player. I can send The Scripts if you want. By the way I should have said this before that I am using DOTween, is that responsible for this somehow.