Пример #1
0
    private void DebugTile(Vector3Int tilemapPosition)
    {
        float   tileWorldX   = tilemapPosition.x * tileSize.x + (tilemap.tileAnchor.x * tileSize.x);
        float   tileWorldY   = tilemapPosition.y * tileSize.y + (tilemap.tileAnchor.y * tileSize.y);
        Vector3 tileWorldPos = new Vector3(tileWorldX, tileWorldY);

        Vector3 tileWorldSize = new Vector3(tileSize.x, tileSize.y);
        Bounds  tileBounds    = new Bounds(tileWorldPos, tileWorldSize);

        DebugHelpers.DrawBox(tileBounds, Color.green);
    }