- Home /
How can I create New GameObject (Instantiate)
hi, I have an animated cube from side to side frames 100 and my problem is that when it collides with a box Colider destroy it and does not born again and this is my script:
function OnCollisionEnter(){ Destroy(gameObject); }
Can you show me an example, how to create a script ?
Look around in this Q&A board, there's a #)$*ing TON of examples.
Answer by pudd1nG · Apr 27, 2012 at 11:32 AM
It would have took you longer to write this post than find an example....
http://unity3d.com/support/documentation/ScriptReference/Object.Instantiate.html
Just LOOK at all the those examples right there on the reference...
Your answer
Follow this Question
Related Questions
Born again object 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
[solved] respawn when destroyed 1 Answer
2D Player Spawn Issue 0 Answers