- Home /
batching does not work if i have dynamic gui
here is what i have:
if(GUI.Button(Rect(GUIHierarchyWidth,i+height),hLabel,wLabel),GetStateOfObject(pathToObject[i]),iGUIStyles.Buttons)){
iSceneControl.ChangeObjectsState(pathToObject[i],true);
}
this is inside loop, everything works fine, texture is chosen in the GetStateOfObject function where Transform of object is passed and state is determined based of the state of material of children (if all are solid, then state is solid, if all are hidden then hidden, and if there are some hidden or transparent then it is mixed) but batching is disabled when i use this. if this function is not used and texture is same batching works. i am developing this for android so batching is important, is there any way to handle this properly?
thank you!
Your answer
![](https://koobas.hobune.stream/wayback/20220612211218im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Dynamic batching doesn't work 0 Answers
Why do meshes break batches on certain positions 1 Answer
Script loads font, how do I change the color? 2 Answers
Will this work for making a dynamic GUI you can edit in Unity? 1 Answer
Getting the Camera to Match the Size of the canvas with dynamically added UI elements 1 Answer