- Home /
Hey! how to connect two objects? So to make one?
Hey! how to connect two objects? So to make one? answer other how can I made cubes and lines, a house to make the building as a single valid?
Thanks
Answer by Lipis · Mar 07, 2010 at 12:26 PM
From the menu choose CreateObject > Create Empty
and then drag the objects that you want to combine into it from Hierarchy
. The newly created object can be as complicated as you wish.
Now if you want to use that object many times in your project it's better to convert it to a Prefab.
Here is how to do it (directly taken from Unity Manual):
To fill the Prefab
, you use a GameObject
that you've created in the scene.
- Choose
Assets->Create->Prefab
from the menu bar and name your newPrefab
. - In
Hierarchy View
, select theGameObject
you wish to make into aPrefab
. - Drag & drop the
GameObject
from theHierarchy
onto the newPrefab
inProject View
.
After you have performed these steps, the GameObject
and all its children have been copied into the Prefab data. The Prefab
can now be re-used in multiple
instances. The original GameObject in the Hierarchy
has now become an instance of the Prefab
.
and how to do that in the game... or live running the app?
At runtime, you can create parent child relationships by setting Transform.parent to the transform of the parent in a script.
Hey thank you a lot from Ukraine! :) Take care of yourself...
Answer by LawyerOfGod · May 01, 2013 at 02:08 PM
There is a script that can combine meshes too,, you only need to do that Lipis said, and then attach the CombineChildren script to the empty parent...
From the Assets menu, Import Package/Scripts. CombineChildren.cs, and $$anonymous$$eshCombineUtility.cs.
Answer by Zxen · Aug 21, 2021 at 04:58 AM
So drawing roads over an entire map requires this kind of pain in the butt workaround all the time? I thought I could just drag out end to end objects like road tiles like any other drawing program. This is nuts!!!
OMFG!!
I just placed about 1000 road tiles end to end to create a road through the desert and the program crashed!!!!!!!! I lost all my work. This program stinks!!!!
Your answer
![](https://koobas.hobune.stream/wayback/20220612100525im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Change objects in scene 3 Answers
How Do I Programatically Attach Objects To Each Other? 3 Answers
Spawning Objects 1 Answer