In this tutorial you will learn how to use OnDestroy method in Unity to do things right before a GameObject is destroyed We create a simple example when you click on a box it gets destroyed and a cool explosion effect plays using a free VFX pack from Unity Asset Store Creatorname: Lyrebird Studio Package name: VFX Magical Flames Link: https://assetstore.unity.com/packages/vfx/particles/vfx-magical-flames-293962 00:00 Intro 00:07 What is OnDestroy in Unity 00:30 Writing the OnMouseDown and OnDestroy script 01:30 Asset used in this video 01:45 Testing the object destruction and explosion What you will learn What OnDestroy does and when it runs How to spawn effects when destroying objects Why OnDestroy needs careful use If you find this video helpful please like and subscribe for more Unity tutorials #Unity #OnDestroy #GameDev #UnityTutorial

How to Upload LARGE Unity Projects to GitHub (Git LFS Tutorial)
40 views

Togg T10X Driving Simulation - Realistic Graphics in Unity 3D
122 views

Making my penguin game BUT WHY? Devlog #3
43 views

Best Snow System for Unity? (Global Snow 2 In Depth Review Tutorial)
204 views

Share your game with the WORLD! (Publish Unity to Itch.io)
98 views

Unity audio setup that actually works
37 views