- Home /
Question by
sleeperkiller06 · Feb 09, 2011 at 07:44 PM ·
getkeydown
Drawing objects
I have a model, say a cube, what I want to do is based on a button push make that cube a sphere, can anyone tell me the best way to script that. Is there some way to stop drawing the cube and draw a sphere in its place. I still want to control it the same way as the cube.
Comment
Answer by efge · Feb 09, 2011 at 08:27 PM
Use OnMouseDown or Input.GetKeyDown for user input and Instantiate and Destroy for replacing one object by another.
If you want to switch between the objects (back and forth) use GameObject.active.
Your answer