Closed firegreen closed 6 years ago
This is solved because the scripts added by the above commit have been tested in a separate Unity project and have been proven to work.
We'll need to use them when the world is finished; when that time comes, I'll be there to explain how to use stuff. But basically :
The central class that manages the loading state of chunks.
We'll want to change the ChunkID
enum's variants based on the level design @firegreen and all come up with.
Components to add to invisible colliders (i.e zones) that trigger the loading of some chunks by their ID. Bridges can be either Sync (block until chunks are loaded) or Async (start loading chunk asynchronously). The best way to go is to have a smaller Sync Bridge covered by a giant Async Bridge.
ChunkBridges only go into effect when a GameObject with a ChunkEnterer component collides with the Bridge's Collider. Typically we'll make it so that iether only the camera or either the hero has a ChunkEnterer component.
Load world progressively according to the hero's location