public override void SetTile(Vector3Int position, GenericTile tile, Matrix4x4 transformMatrix, Color color) { ObjectTile objectTile = tile as ObjectTile; if (objectTile) { //hack to expand bounds when placing items in editor base.InternalSetTile(position, tile); base.InternalSetTile(position, null); objectTile.SpawnObject(position, tilemap, transformMatrix); } }
public override void SetTile(Vector3Int position, GenericTile tile, Matrix4x4 transformMatrix) { ObjectTile objectTile = tile as ObjectTile; if (objectTile) { if (!objectTile.IsItem) { tilemap.SetTile(position, null); } objectTile.SpawnObject(position, tilemap, transformMatrix); } else { base.SetTile(position, tile, transformMatrix); } }