What are Unity Events and Triggers for End game/Win condition?

I need End game and load main menu when Object is destroyed.

1 Answer

1

Hello @SkaarjLeader,

You can use the function private void OnDestroy() which is from MonoBehaviour, so if you create a script and attach it to your gameObject, when your gameObject is destroyed what is inside the OnDestroy method will be executed and in your case you can display your end game and load your menu.

Don’t hesitate to share more informations about what you want to achieve

I hope it helps

Hi thank you. I will try to make script with this. Actually its only thing last thing of game where I need to write a code. All other parts of game can be done with assets or no scripts. My game is just like Smite, object is fountain. Unity Doc is not easy to use(