optimize tiled imports by disabling y sorting

This commit is contained in:
Chris Cromer 2022-04-23 15:39:47 -04:00
parent 4a2cda5ecd
commit 2280e72ff1
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
2 changed files with 7 additions and 2 deletions

View File

@ -72,6 +72,10 @@ func get_import_options(preset):
{
"name": "uv_clip",
"default_value": true
},
{
"name": "y_sort",
"default_value": false
},
{
"name": "image_flags",

View File

@ -227,9 +227,10 @@ func make_layer(layer, parent, root, data):
tilemap.mode = map_mode
tilemap.cell_half_offset = map_offset
tilemap.format = 1
tilemap.cell_custom_transform = Transform2D(Vector2(cell_size.x, 0), Vector2(0, cell_size.y), Vector2(0, 0))
tilemap.cell_clip_uv = options.uv_clip
tilemap.cell_y_sort = true
tilemap.cell_tile_origin = TileMap.TILE_ORIGIN_BOTTOM_LEFT
tilemap.cell_y_sort = options.y_sort
tilemap.cell_tile_origin = TileMap.TILE_ORIGIN_TOP_LEFT
tilemap.collision_layer = options.collision_layer
tilemap.collision_mask = options.collision_mask
tilemap.z_index = z_index