public override void GetTileData(Vec3I gridPos, TM.ITilemap itilemap, ref TM.TileData tileData) { Vec2I pos = GridToTile(gridPos); Vec2I subTile = GridToSubTile(gridPos); Map.BBTile tile = GetTile(pos); TileSprite sprite = HasSprite(tile, pos, subTile) ? GetSprite(tile, pos, subTile) : null; tileData = new TM.TileData { sprite = sprite.sprite, color = sprite.color, transform = sprite.xform, gameObject = null, flags = TM.TileFlags.None, colliderType = ColliderType.None }; // Unity so broken (requires tileData.color to be set also *shrug*) tilemap.SetColor(gridPos, sprite.color); }
private TileSprite Virtualize(TileSprite sprite) => new TileSprite(sprite.sprite, sprite.color * new Color(.6f, .6f, 1, .5f));