I’ve been looking through the documents here:
I was wondering it it was possible to do this to a scene once the game starts as it is being procedurally generated.
I’ve been looking through the documents here:
I was wondering it it was possible to do this to a scene once the game starts as it is being procedurally generated.
No, that’s not possible. At least not with the occlusion culling system that Unity uses. The calculation which parts are visible from which points is quite complicated and has to be precomputed in the editor. So it won’t work for procedurally generated levels.
You have to roll your own solution if you need something like that. Just a few weeks (or month?) ago i implemented a VisPortals solution similar to those used by Doom3 (basically how most ID Tech engines work). It’s more a prove of concept than a ready-to-use solution.
Usually i upload a webplayer demo onto my dropbox, however i just realised that Dropbox finally prevented to directly view HTML pages off my public folder. They now force a download of the page which breaks everything. So if you want to try it, you have to download the project.
Of course vis portals doesn’t work in all situations. They are perfect for closed environments which can be split nicely into seperate areas. Of course this splitting into areas and the creation of the visportals currently is done by hand. So you would need to automate this yourself.
Be careful with static batching, it might break the system as each area has to be seperate so it can be enabled / disabled seperately.