- Home /
Combining 3d objects to create one object
So basically I have multiple objects(like a tree, background, plants etc.) that I want to combine and save as one asset. I have figured out how to combine all of them, but I would like to be able to name and save that specific combination of objects as one object. Any insight to this would be very helpful and I feel would be common knowledge. I just have not come up with any luck with my unity forum or google searches. Thanks for any help in advance as it is highly appreciated!
Answer by tsnyder321 · Sep 01, 2016 at 03:10 PM
It sounds to me like you may want to take advantage of using prefabs.
https://docs.unity3d.com/Manual/Prefabs.html
So you'd parent all your objects to a single, top level gameobject, and then make that top level object your prefab. You can now reuse all of those object over, and just get the prefab and disable it to disable all its children.
GameObject.Find ("prefab_name").SetActive (true/false); //C# statement
Oh, and just an FYI you do not NEED to use a prefab for this, but it is good practice as I understand it to use prefabs. You could do the same technique, skipping the prefab part, and just use GameObject.Find () on the top level gameobject's name.
This is exactly what I needed, Thank you for the help!
Answer by sparkzbarca · Sep 01, 2016 at 06:24 AM
I mean the easiest thing as far as just being an object is to parent the parts together. Then you can have them as a thing.
As far as combining them into like a true single item I guess you could just open all of them together in one scene in like blender and save it as a single thing.
I'm not sure though why you want to have such a disparate collection of objects together as one object but if it makes sense for you just using parenting to to make the background the parent of the trees and bushes and such.
What I want to do end term is be able to call those groups of objects by only calling one item, and then have a new set of group objects be called and have the first set disappear. Would this be possible by using a parent object? Or is there another method I could do?
Your answer

Follow this Question
Related Questions
How to combine two custom objects? 2 Answers
Best way to optimize scene with multiple instances of a destroyable object 1 Answer
combining littles sprites into one big sprite ? 1 Answer
Issue in merging two different kind of objects (image attached) 1 Answer
How to combine sprites and make 1 collider for them 1 Answer