Quick answer: Unity Isometric Z-as-Y tilemap losing sort order after runtime cell changes? The sort order is cached - call CompressBounds and RefreshTile for the modified cells.
Iso RPG: characters walk behind walls correctly until a wall is destroyed mid-game. Then everything renders flat.
Refresh modified cells
tilemap.RefreshTile(cellPos);
tilemap.CompressBounds();Refresh recalculates render order for the cell; CompressBounds clamps the cached bounds.
Set the Transparency Sort Mode
Project Settings > Graphics > Transparency Sort Mode = Custom Axis (0,1,-0.26). Isometric sort needs the right axis; default breaks after edits.
Use a custom rule tile
For destructible terrain, a custom RuleTile with explicit sort order metadata beats relying on bounds.
“Isometric sorting is cached. Mutations require explicit invalidation.”
Profile the refresh cost. RefreshTile per cell is cheap; calling it on a whole tilemap is not. Be surgical.