But then the now empty cell doesn't hide it's prefab, so I have to use .HidePrefab() on it. And during the battle the combatants continue to walk straight through the empty cell even though the empty cell is set to block and not passable, so the combatants should walk around it instead?
Is there like a proper way to initialize the grid after changing it?
Try calling RemoveGridPrefabs on the grid compoment before changing the cell types. Set the Settings property of the grid cell component to null after changing the cell type.
After you've changed call cells, call ShowGridPrefabs on the grid component to show the prefabs.
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Set the Settings property of the grid cell component to null after changing the cell type.
After you've changed call cells, call ShowGridPrefabs on the grid component to show the prefabs.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!