Ejemplo n.º 1
0
        private void SetPreviewTile(MetaTileMap metaTilemap, Vector3Int position, LayerTile tile)
        {
            if (tile is ObjectTile)
            {
                if (previewTile == null)
                {
                    previewTile = CreateInstance <PreviewTile>();
                }

                previewTile.ReferenceTile = tile;
                tile = previewTile;

                position.z++; // to draw the object over already existing stuff
            }

            metaTilemap.SetPreviewTile(position, tile, brush.cells[0].matrix);
        }