- Home /
About batches and triangles
Hi
I have this problem. I'm making a 2d game. All it has are some images grouping together to form entities. No materials, no meshes, no texturing. Only images and text floating around. In one of my two scenes I'm instantiating 15 copies of my main prefab. In the rendering stas window I see ~3k triangles and 40-50 batches. In the other scene, for 33 copies of the same prefab I have ~7k triangles nad 500+ batches! I played around in the editor and I noticed this. In the first scene, the relation between prefabs-batches-triangles is this. With no prefabs the batches are 30. If I add 1 prefab the batches go to 41.(the triangles are increasing normally, ~250 per prefab). But when I add more prefabs the number of batches stays the same! 41 for 1 prefab and 41 for 15 prefabs! In the second scene. the same prefab cost 15 batches each. So, 1 prefab = 15 batches and 10 prefabs = 150 batches! And that is a problem. Of course the prefabs are not thrown just like that in the scene. In both scenes there's a canvas then a hierarchy of objects and layouts and then the prefabs. Maybe somewhere in the hierarchy is the problem. In another experiment, I made an empty scene with only one canvas. When I put some prefabs in, each prefab cost about 15 batches. Then I made some empy objects like this:
Canvas
|-Collection
| |-Rows
| | |-Row1
| | | |-Prefab
| | | |-Prefab
| | |-Row2
| | | |-Prefab
| | | |-Prefab
| | |-Row3
| | | |-Prefab
| | | |-Prefab
No batches reduction. But, when I adjusted the size, position and layout of the objects, all of a sudden, the batches went to a low number and followed the behaviour pattern which my first scene had(no matter how many prefabs, the number of batches stayed the same)
Any explanations? Where should I start looking?
Thank you
I have the same question as you! Please someone answer this!!!
Your answer
Follow this Question
Related Questions
Callback for when an object is deleted from the scene by the user in EditorMode. 3 Answers
How can I permanently display (`EditorApplication's) current scene name in Editor? 1 Answer
Unloaded scenes continuously keep adding? 1 Answer
Overwrite the inspector window on Scene Asset heading chosen in the hierarchy window 0 Answers
Reload a scene without closing the inspector and hierarchy 0 Answers