Can I using Occlusion Culling to objects which are created through a script?
I need to create 500к cubes, and make it in the editor, for calculate Occlusion Culling, but it is not possible, for example.
If it’s can’t do, how it was made on cubelands.com - there about 500k cubes and good perfomance.
No. I mean the component of unity - Window->Occlusion Culling in Pro version.
I get use it only with static objects that are already on the scene in editor. But how do I use it, if the objects are created from static Prefab via script?
Its an offline process. So you bake the occlusion data in the editor
Only objects in the editor marked as static will cause an occlusion
Anything else will only be occluded (be it dynamic in editor or added through code later), none of them will ever act as an occluder and you can never make them act as an occluder due to the fundamental port mentioned in step 1 (the occlusion is generated offline, there is no realtime occlusion with dynamic objects happening)
if you need occlusion from dynamic objects you must implement something yourself and think about how doing it, there is no general way to do it outside the desktop where you have the GFX Occlusion Query but that one is taxing for hardware older than GF 7900 / HD 2900 and also not exposed in Unity for usage.