public void Rot90(bool changeFlags = true) { int gridX = BrushUtil.GetGridX(-Offset, m_brushTilemap.CellSize); int gridY = BrushUtil.GetGridY(-Offset, m_brushTilemap.CellSize); Offset = -new Vector2(gridY * m_brushTilemap.CellSize.x, (m_brushTilemap.GridWidth - gridX - 1) * m_brushTilemap.CellSize.y); m_brushTilemap.Rot90(changeFlags); m_brushTilemap.UpdateMeshImmediate(); }