Relationships: Chunksize, Padding, Selector
This system is flexible, but it is easy to make mistakes. If you have the chunk size set too large and use large values for padding it’s entirely possible that the entire TileFab for the TScene gets loaded all at once; i.e., no chunking.
Internally, the TileFab is Chunkified (broken up into smaller areas of ChunkSize x ChunkSize) regardless of what the padding values are set to. Padding is very sensitive to layout.
If you try tweaking the overrides for the Level0 Selector in the demo so that:
- Override Chunk Size checked
- Chunk Size set to 16
- Override Padding checked
- Padding set to 4,4
Ensure that the Scene View is visible and click PLAY. You’ll see that the entire TScene is loaded. What’s actually happening is that padding of 4,4 expands the Camera view bounds enough to cause the layout system to load every chunk within the TileFab.
This is not a bug and doesn’t hurt anything but there’s no reason to use a chunking system if you want to load the whole thing at once; there are simpler ways to load an entire TileFab at once.
Most of the time you want to use the smallest possible chunk size that makes sense for performance; noting that you have a lot of control over this with the ‘Throttling’ feature of the ZoneLayout component. Adjust padding while watching the Scene view as your player moves around. The idea of Padding is to ensure that new chunks (Zones) are loaded outside of the camera view even if your player is moving.