From a3d612fefa987b66cb82bb1ec40bffd571a46515 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 3 Jan 2024 03:06:16 -0800 Subject: [PATCH] update samples --- Assets/LDtkUnity/Samples~/Samples/AutoLayers_1_basic.ldtk | 2 +- .../LDtkUnity/Samples~/Samples/AutoLayers_2_stamps.ldtk | 2 +- .../AutoLayers_2_stamps/Inca_front_by_Kronbits.ldtkt | 1 - .../LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic.ldtk | 2 +- .../AutoLayers_3_Mosaic/Inca_back2_by_Kronbits.ldtkt | 1 - .../Inca_extended_front_by_Kronbits.ldtkt | 1 - .../Samples~/Samples/AutoLayers_4_Assistant.ldtk | 2 +- .../Inca_extended_front_by_Kronbits.ldtkt | 1 - .../LDtkUnity/Samples~/Samples/AutoLayers_5_Advanced.ldtk | 2 +- .../Samples~/Samples/AutoLayers_6_OptionalRules.ldtk | 2 +- Assets/LDtkUnity/Samples~/Samples/Entities.ldtk | 2 +- Assets/LDtkUnity/Samples~/Samples/SeparateLevelFiles.ldtk | 2 +- .../Samples/Test_file_for_API_showing_all_features.ldtk | 2 +- .../Samples~/Samples/Typical_2D_platformer_example.ldtk | 2 +- .../Samples~/Samples/Typical_TopDown_example.ldtk | 2 +- .../LDtkUnity/Samples~/Samples/WorldMap_Free_layout.ldtk | 8 ++++---- .../Samples~/Samples/WorldMap_GridVania_layout.ldtk | 2 +- Assets/Tools/SampleUpdater.cs | 6 +++++- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_1_basic.ldtk b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_1_basic.ldtk index 5335771e0..adac7b69a 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_1_basic.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_1_basic.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "IntGrid layers can paint tiles automatically using simple RULE SETS.\n\n - Press [SHIFT + R] to toggle auto-layer rendering\n - Click on the RULES button on the left to see/edit rules.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe AutoLayers_1_basic", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps.ldtk b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps.ldtk index e4e1469f6..55fb29976 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "\"STAMPS\" are groups of multiple tiles that are generated by RULES.\n\nClick on the RULES button on the left to see them.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe AutoLayers_2_stamps", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps/Inca_front_by_Kronbits.ldtkt b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps/Inca_front_by_Kronbits.ldtkt index 1b039501d..e68d045fe 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps/Inca_front_by_Kronbits.ldtkt +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps/Inca_front_by_Kronbits.ldtkt @@ -1,5 +1,4 @@ { - "Ppu": 16, "Rects": null, "Def": { "__cHei": 14, diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic.ldtk b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic.ldtk index 44a4294c7..6057538f4 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "This example demonstrates the use of rules to create complex but dynamic mosaics.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe AutoLayers_3_Mosaic", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_back2_by_Kronbits.ldtkt b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_back2_by_Kronbits.ldtkt index 95b79b61d..65befed11 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_back2_by_Kronbits.ldtkt +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_back2_by_Kronbits.ldtkt @@ -1,5 +1,4 @@ { - "Ppu": 16, "Rects": null, "Def": { "__cHei": 14, diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_extended_front_by_Kronbits.ldtkt b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_extended_front_by_Kronbits.ldtkt index 48ef8da17..438fc8ce8 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_extended_front_by_Kronbits.ldtkt +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic/Inca_extended_front_by_Kronbits.ldtkt @@ -1,5 +1,4 @@ { - "Ppu": 16, "Rects": null, "Def": { "__cHei": 14, diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant.ldtk b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant.ldtk index 226c263e4..056ee460e 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "In this example, the rules are automatically created and managed by the rule \"Assistant\".\n\nTo open it, click on the \"Rules\" button on the left, then \"Edit\" on the \"Walls\" group.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe AutoLayers_4_Assistant", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant/Inca_extended_front_by_Kronbits.ldtkt b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant/Inca_extended_front_by_Kronbits.ldtkt index 48ef8da17..438fc8ce8 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant/Inca_extended_front_by_Kronbits.ldtkt +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_4_Assistant/Inca_extended_front_by_Kronbits.ldtkt @@ -1,5 +1,4 @@ { - "Ppu": 16, "Rects": null, "Def": { "__cHei": 14, diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_5_Advanced.ldtk b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_5_Advanced.ldtk index 54586a84f..935419378 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_5_Advanced.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_5_Advanced.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "Rules can be used to render various biome elements, such as Dirt, Water or Lava.\n\nPress [SHIFT + R] to toggle auto-layers rendering", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe AutoLayers_5_Advanced", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_6_OptionalRules.ldtk b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_6_OptionalRules.ldtk index 082e6f1a0..cbab06e4f 100644 --- a/Assets/LDtkUnity/Samples~/Samples/AutoLayers_6_OptionalRules.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/AutoLayers_6_OptionalRules.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "level_x%gx,y%gy", "tutorialDesc": "This sample shows how to use OPTIONAL rules to create biomes and variations easily.\n\nClick the \"RULES\" button on the left to see all the rule groups. Some groups are BLUE: they are optional which means they are disabled by default, and can be enabled only in specific levels.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe AutoLayers_6_OptionalRules", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/Entities.ldtk b/Assets/LDtkUnity/Samples~/Samples/Entities.ldtk index 53fb27dad..e96553b6b 100644 --- a/Assets/LDtkUnity/Samples~/Samples/Entities.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/Entities.ldtk @@ -46,7 +46,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "Entities can be used to represent any gameplay element, such as player, enemies, items etc.\n\nThey can have many kind of customizable properties, including arrays, enums or coordinates.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe Entities", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/SeparateLevelFiles.ldtk b/Assets/LDtkUnity/Samples~/Samples/SeparateLevelFiles.ldtk index 7004ab192..97f4c9668 100644 --- a/Assets/LDtkUnity/Samples~/Samples/SeparateLevelFiles.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/SeparateLevelFiles.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "In this example, the levels are stored in separate files, in a subfolder. \n\nThis is fully transparent from the editor perspective.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe SeparateLevelFiles", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/Test_file_for_API_showing_all_features.ldtk b/Assets/LDtkUnity/Samples~/Samples/Test_file_for_API_showing_all_features.ldtk index 5fbdefdad..ff9f684be 100644 --- a/Assets/LDtkUnity/Samples~/Samples/Test_file_for_API_showing_all_features.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/Test_file_for_API_showing_all_features.ldtk @@ -51,7 +51,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "This file can be used to check if an API supports LDtk file format properly. \n\nIt uses most important LDtk features.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe Test_file_for_API_showing_all_features", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/Typical_2D_platformer_example.ldtk b/Assets/LDtkUnity/Samples~/Samples/Typical_2D_platformer_example.ldtk index 5ee9bfcec..c34efd80f 100644 --- a/Assets/LDtkUnity/Samples~/Samples/Typical_2D_platformer_example.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/Typical_2D_platformer_example.ldtk @@ -38,7 +38,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "This sample demonstrates a typical 2D platformer with auto-rendered walls and various gameplay entities.\nPress [Shift+A] to toggle \"Single layer mode\", which helps understanding which layer contains what.\nPress [SHIFT+R] to toggle auto-rendered layers.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe Typical_2D_platformer_example", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/Typical_TopDown_example.ldtk b/Assets/LDtkUnity/Samples~/Samples/Typical_TopDown_example.ldtk index d8af65963..619a48183 100644 --- a/Assets/LDtkUnity/Samples~/Samples/Typical_TopDown_example.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/Typical_TopDown_example.ldtk @@ -46,7 +46,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "This example uses a combination of Auto-Layers with a vertical offset of -16px on the \"Wall_tops\" layer. This trick allows rendering of a \"top-down\" level with a minimal amount of tiles (and work).\n\nPress [SHIFT + A] to toggle \"Single Layer Mode\", and see what each layer really contains.\n\nPress [SHIFT + R] to toggle rendering of rules based layers.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe Typical_TopDown_example", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/LDtkUnity/Samples~/Samples/WorldMap_Free_layout.ldtk b/Assets/LDtkUnity/Samples~/Samples/WorldMap_Free_layout.ldtk index 723131192..0256683c5 100644 --- a/Assets/LDtkUnity/Samples~/Samples/WorldMap_Free_layout.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/WorldMap_Free_layout.ldtk @@ -10,7 +10,7 @@ }, "iid": "a3619740-7820-11ed-b6fd-4b64aa0352a1", "jsonVersion": "1.4.1", - "appBuildId": 471015, + "appBuildId": 471014, "nextUid": 125, "identifierStyle": "Capitalize", "toc": [], @@ -38,8 +38,8 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "In \"Free\" world layout, levels are positionned freely in the 2D space.\n\nIn this example, some are even in different world layers (ie. above and behind). Use [PAGE UP] and [PAGE DOWN] to move between world layers.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], - "flags": [ "IgnoreBackupSuggest", "UseMultilinesType" ], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe WorldMap_Free_layout", "when": "AfterSave" }], + "flags": ["UseMultilinesType"], "defs": { "layers": [ { "__type": "Entities", @@ -15044,4 +15044,4 @@ ], "worlds": [], "dummyWorldIid": "ca0e9bf0-c640-11ed-ad34-5d947c1a0a9f" -} \ No newline at end of file +} diff --git a/Assets/LDtkUnity/Samples~/Samples/WorldMap_GridVania_layout.ldtk b/Assets/LDtkUnity/Samples~/Samples/WorldMap_GridVania_layout.ldtk index 53c9ca17b..7b8c46b7f 100644 --- a/Assets/LDtkUnity/Samples~/Samples/WorldMap_GridVania_layout.ldtk +++ b/Assets/LDtkUnity/Samples~/Samples/WorldMap_GridVania_layout.ldtk @@ -46,7 +46,7 @@ "backupRelPath": null, "levelNamePattern": "%world_Level_%idx", "tutorialDesc": "In Gridvania world layouts, levels are organized on a large grid.\nPress [W] to switch to World mode.\nIn this example, some are even in different world layers (ie. above and behind). Use [PAGE UP] and [PAGE DOWN] to move between world layers.", - "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe", "when": "AfterSave" }], + "customCommands": [{ "command": "../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe WorldMap_GridVania_layout", "when": "AfterSave" }], "flags": ["UseMultilinesType"], "defs": { "layers": [ { diff --git a/Assets/Tools/SampleUpdater.cs b/Assets/Tools/SampleUpdater.cs index d85fbc11e..e7c43572a 100644 --- a/Assets/Tools/SampleUpdater.cs +++ b/Assets/Tools/SampleUpdater.cs @@ -65,7 +65,11 @@ private static void CopyFilesRecursively(string sourcePath, string targetPath) string dest = newPath.Replace(sourcePath, targetPath); File.Copy(newPath, dest, true); - LDtkEditorCommandUpdater.ModifyProjectWithCommand(dest, @"../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe"); + + //add the custom command + string fileName = Path.GetFileNameWithoutExtension(dest); + string command = $"../../../Library/LDtkTilesetExporter/ExportTilesetDefinition.exe {fileName}"; + LDtkEditorCommandUpdater.ModifyProjectWithCommand(dest, command); } } }