change one object into another, and then back again
For example, I would like to change a cube into a sphere, then change that sphere into a capsule, by pressing the up arrow. I would also like to be able to change in the other direction. Change the capsule into a sphere, then change the sphere into a cube, by pressing the down arrow. It would be great if i could add extra objects in, say a pyramid etc.
Ultimately i would want to do this with a seed, sapling, and tree. Each with there own properties.
Answer by tormentoarmagedoom · May 15, 2019 at 08:03 AM
Hello @McStag
Ther is no way to "transform a mesh" into another. What you need to do is to have all of them at the correct position, and activate/disable each when ois necessary.
I think best option is to have a emptyobject, and all the objects as a child of this emptyobject.
Then by scripting, use the command SetActive(true) or (false) when is necessary.
Bye!
Your answer
![](https://koobas.hobune.stream/wayback/20220612201427im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Change color of object on and off with click 1 Answer
Change object scale by touch (in game) ^ 0 Answers
Change position parameters of object onMouseOver 0 Answers
Having problems with custom objects in my array - BCE0019 0 Answers
Object reference not set to an instance of an object [problem with Unity 5] 2 Answers