I’m having a bugger of a time getting occlusion portals to work properly. No matter what I do, it seems some of my portals get “stuck” in the state they’re in at scene start (open or closed). Once a portal gets “stuck,” toggling the “open” variable has no effect.
For instance, I have a gate prefab that has an occlusion portal on it. This portal starts closed (open isn’t set). For some of these gates, opening them (and toggling the “open” variable) has no effect. The gate opens, and is a yawning black chasm until I step through it. If I start the gate open, closing it has no effect - content on the other side of it isn’t occluded. But it’s only for some portals. Somewhere between 50 and 75% of them work properly even though they’re all from the same prefab. It’s driving me mad.
Oddly, changing the parameters for Occlusion Culling and rebaking occlusion will sometimes fix broken gates, though sometimes new gates break when I do this as well, and there’s no universal set of settings that seems to work for all cases.
I’m not sure if this is a bug, or if I’m just doing something completely wrong. There’s not much documentation on correct setup for occlusion portals. For example, do I need to manually create occlusion zones on either side of the portal? It doesn’t seem so, but I don’t know. Do the occlusion portals have to be larger in every dimension than the smallest occluder setting? Doesn’t seem to make a difference, but I don’t know.
I’m currently using 5.5.0b10, but I get the same behaviour on older versions of Unity as well.
Any assistance would be greatly appreciated.