- Home /
How to disable playOnAwake on startup?
Simply i created FPS game and i have a gun that does damage to objects, soo i want to create an explosion when object is destroyed.. my question is .. I created particle effect and enabled "playOnAwake" and set it as an instantiate but it instantiates on startup and when I destroy object, how can i remove that startup instantiate? I only want it to be visible when i destroy my object as Destruction effect.
Thanks in advance!
Answer by Ellie97 · Sep 27, 2018 at 12:19 PM
Sorry if this is a stupid question, but are you instantiating the particle effect as a prefab (in the assets folder) or as an object in your hierarchy? If it's the latter, turn your particle effect object into a prefab, delete it from the hierarchy and set the object that instantiates as the one in the assets folder you just created.
Answer by ArseneySorokin · Sep 27, 2018 at 11:28 AM
Disable it and ReEnable it whenever you need it to work.
Your answer
![](https://koobas.hobune.stream/wayback/20220612175230im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unitys Particle System wont work like i want 0 Answers
Assign particle collision in code? 0 Answers
Playing an Instintiated particle system prefab. 1 Answer
Does anyone know how to go about achieving slash effects like this? 0 Answers
How to create a particle system like Absorb power in unity 1 Answer