Asset Configuration
Last updated
Last updated
Configure nearly everything you need for your gameplay in just one place. Simply locate and click on the GameConfig
object in the demo scene to open the configuration
The only thing that you can not configure in the global configurator are the grid dimensions, the grid cell size and the debug color. This is to keep the grid configuration flexible, in case you want to create multi grid systems with different dimensions and cell sizes.
Note: This asset currently does not support multi grid management
Locate the Grid GameObject under GridBuildSystem → Grid and specify your grid size.
Dimensions
Define the amount of cells in x and y direction. Y is actually the z direction in unity world space, since unity uses the Y for the Upwards vector
Cell Size
Define the size of each individual cell
Debug Color
Do not change the grid cell size again for scenes with existing saveFiles.
Feel free to test different cell sizes and explore what fits your use case the best, but once you have saved a scene with a specific cell size, do not change the size again. The reason is that the saved object positions and occupied cells are stored in the saveFile and are based on the cell size that you used when placing your objects. When loading the saveFile again there is no additional check that if the cell size is still the same as it was previously
Example of loading a game state created with cell size of 1 but using a new cell size of 0.33:
Actually all gameobjects are still on the same grid positions than previously, but since the cells are smaller, there will be a lot of overlapping.
A similar effect can be seen with a higher cell size of 2:
Still the grid positions are all the same, but the object now would occupy less cells than it was stored in the saveFile. A Rocket of size 2x2 only occupies 1 cell of size 2, but with cell size of 1 it would occupy 4 cells.
Specify a grid debug color for the scene view. If you don’t want the grid to be shown in scene view, simply set the color alpha to zero.