- Home /
Instantiate the subchild (the renderer) from prefab?
What I want is just like the title says
For ones who don't understand: I have the prefab with many children and subchildren in these children. This prefab have the renderer in subchild, I want to instantiate that subchild whenever I press "A", which is the best way?
Here is my trouble right now
1- The prefab just shows the first level children, not show the subchild, so I can't drag the subchild to the script and instantiate it :(
2- If I use the "find" command to find the child. It's will make game slower, whenever I press "A" won't It?
Anyone has another idea?
I'm getting crazy about this for 2 days thinking, searching, etc
Thanks a a lot and appreciate!
Answer by Meltdown · Aug 16, 2012 at 07:15 PM
That sounds like bad design to me what you are trying to do. Each object you want to instantiate should be in it it's own prefab. I'd suggest breaking up your object hierarchy so it can accommodate this.
Your answer
Follow this Question
Related Questions
Spawn Shield to all objects 2 Answers
Give prefab a parent 2 Answers
Instantiate prefab with different values each time 4 Answers
How do I get the global position 2 Answers