- Home /
Why my prefab is destroyed after reloading level?
Help me please. :-(
Explain what is happening, please. How should anyone be able to help you when the only information you provide is the title of your question? :-(
Answer by DDaddySupreme · Jun 22, 2017 at 05:29 PM
Can we get some more details about what's happening? Does it completely remove it from your folders? How are you using the prefab to make it do this? My guess, based on the information you've given, is that you're calling Destroy(GameObject) on a reference to the prefab instead of to an instance of it, if that makes sense. Or maybe you just forgot to use DontDestroyOnLoad?
Answer by Guynelk · Jun 22, 2017 at 08:29 PM
Hi. Thank you for your answer. When I instantiate my prefab in game, everything work. But when I fight against an armed minion and I lose all my hearts, the level begins again, and there I find myself without my prefab (in game). And when I use the function"Don' t destroy On load ", my character duplicates and a clone appears. Can you help me please?
Your answer
![](https://koobas.hobune.stream/wayback/20220612124710im_/https://answers.unity.com/themes/thub/images/avi.jpg)