- Home /
Object stats counted even if they are out of view, why?
Hi,
I have a terrain with mountains. Now I have one object, let's say traffic sign that I use as a prefab and I place it all over terrain (total of 30 signs). Stats of one sign are 1 draw call, 100 tris, 100 verts. Usualy I have only 1-3 traffic signs in my view and I would expect 1 draw call, 2 or 3 batched, and tris and verts rised for coresponding amount. But I see that almost all signs (20+) are batched (draw call), and also tris and verts are raised for same amount of 20+ signs. So, it is also counting signs that are out of view.
Why is this happening?
I'm using Unity 4.6 free Version.
Thank you, I realised that Occlusion Culling is what I need but it is available only in PRO version.
Is there a way how I can calculate a distance of side objects from my main object? $$anonymous$$y idea is to deactivate every object which distance from main object is grater then X. How could I calculate a distance?
I don't want to use Camera Clipping planes.
I can't tell you if this solution proves to be any good, because the question is, if it might be even worse for performance to calculate all the distances and then deactivate objects. Unity Pro Occlusion Culling works on a much lower level.
If you aren't stuck with 4.6, consider upgrading to 5. All engine features, including frustum culling and occlusion culling, are free in 5.
Problem is that I'm stuck to Unity 4.6. Unity 5 have some performance problem on Android (25-35% lower fps then on Unity 4.6).
Answer by Xarbrough · Jun 22, 2015 at 12:08 AM
Yes Unity free will also render objects that are not visible. Only Unity Pro has the option to cull those objects away.
I realised that Occlusion Culling is what I need, but it is avaliable only in PRO version.
$$anonymous$$y idea now is to somehow calculate distance of side objects from main object and if this side objects are distanced from main object for X then they will be deactivated. I'm gona look up for this solution and try it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613201233im_/https://answers.unity.com/themes/thub/images/avi.jpg)