- Home /
how to have multiple meshes be part of a single instantiated prefab gameobject?
I have a question on how to have multiple meshes be part of the same game object/prefab.
I have a prefab that has my spaceship mesh.
The space ship has two exhaust nozzles.
I would like to place two billboards (unity planes) in front of each nozzle. I will place an engine glow texture (tga with transparency) on each billboard to simulate... engine glow.
My question is, as I already have the PlayerShip prefab with the spaceship mesh. How do I add two unity planes to the PlayerShip prefab so that when I instatiate the prefab the ship mesh and two billboards come into being and if I transform the playership (rotate/move) the billboards/planes stay in place in front of the nozzles?
I will also need to give the billboards a name so I can reference them in order to apply the engine glow texture.
What are the steps for adding two plane meshes to an existing prefab with a mesh already part of it? How do I name the two added plane meshes?
Thanks for any help.
Answer by Eric5h5 · Nov 30, 2010 at 04:55 AM
Add additional objects as children. You can apply scripts to the objects, so you don't necessarily need to get references.
Thanks. Is there some documentation or a tutorial you could point me to that covers how to create children objects and tie them back to the parent?
Just drag objects in the hierarchy on top of other objects, then they become children.