- Home /
Hiding gameobjects in hierarchy make it less expensive ?
The problem is i have a prefab but the prefab have many many children cubes. So each time i drag the prefab to the scene or the hierarchy it's adding to the hierarchy a lot of children cubes.
Is there any solution to no adding the children to the hierarchy ? Maybe to convert the prefab to something else ? Maybe hiding the children in the hierarchy ? But hiding is just make them no visible they are still in the hierarchy.
Maybe there is a way to make copy of the whole children as one prefab without the children ?
I'm not sure I understand the issue. If the original prefab has many children it's logical that when you drap the prefab into a scene all children will come with it... ?
What is your goal ? If it's not "just" hiding the children ?
But the prefab have like 500 children cubes. $$anonymous$$y question if it's not too expensive i mean if i have 3-4-5 prefabs each 500 children cubes it won't make everything slowly when running the game and the prefabs are in the hierarchy ?
If you are trying to have the editor running smoothly with heavy objects within the scene I don't think there is a magic solution to solve that issue (that I know of). When I work with a lot of object I usually try to not select / open the hierachy at runtime. Selecting a parent will make stuf with all dependencies.
If all the cubes stay in the same place all the time, you could mesh combine them to just one mesh. This will reduce your hierarchy to 1:
https://docs.unity3d.com/ScriptReference/$$anonymous$$esh.Combine$$anonymous$$eshes.html
Why are there 500 children within the prefab if you don't want 500 children in the scene when you add the prefab?
IE, what purpose do these 500 child objects serve?
Your answer
Follow this Question
Related Questions
prefab navagent doesnt work,prefab navmesh doesnt work 1 Answer
Can't modify BoxCollider center/size on base prefab 0 Answers
"Change" Prefab Component Attributes 0 Answers
Link GUIText to a prefab? 2 Answers