Generates an endless level with obstacles (using blue noise algorithm).
-
When the character comes within a certain distance to the edge of the level, new chunks are generated.
-
When the character moves away from the far chunks, they are disabled (to save the generated level and not to affect performance).
Drawing distance can be customized in the LevelGenerator script
When a new chunk is spawned, obstacles are generated on it using the blue noise algorithm. The chunk is divided into several virtual segments, in each of which an object can be generated (at a random point). This allows for more predictable (but still random) generation of objects in the scene and not worry that they will be generated close to each other. Here you'll find more info about the blue noise algorithm.
You can customize the generation parameters for each chunk separately in the ChunkObject script.
Character - https://assetstore.unity.com/packages/3d/characters/meshtint-free-boximon-fiery-mega-toon-series-153958
Obstacles - https://assetstore.unity.com/packages/3d/props/polygon-starter-pack-low-poly-3d-art-by-synty-156819