- Home /
Spawn a Prefab when it is destroyed
Please Help! I am a very basic unity user. I want to immediately respawn a prefab when it is destroyed. How to I go about doing this?
Thanks
Answer by Mark 6 · Sep 16, 2010 at 11:18 AM
Take a look at this link. http://unity3d.com/support/documentation/ScriptReference/index.Instantiate.html
Answer by Wotan · Sep 16, 2010 at 11:29 AM
In order to realize when your object is destroyed you should use the OnDisabled() method, which is called when an object is destroyed (be aware that it is also called when the object gets disabled). Then you can instantiate a new copy of the prefab.
Answer by unityart3ds · Oct 30, 2012 at 06:50 PM
Ok it is nothing hard just type this in your script I use Unity script by the way but I hope this helps you.
Go to users and type in unityart3ds and you will find your answer.:)
Your answer
Follow this Question
Related Questions
Respawning Navmesh and Prefabs 0 Answers
Trying to respawn prefabs after destroying them with a reset button 1 Answer
Respawn back at the old position. 1 Answer
Points attached to a prefab 0 Answers
Creating new prefab at runtime 1 Answer