Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed Jan 3, 2024
1 parent 227bbcd commit a3d612f
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Assets/LDtkUnity/Samples~/Samples/AutoLayers_1_basic.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/LDtkUnity/Samples~/Samples/AutoLayers_2_stamps.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"Ppu": 16,
"Rects": null,
"Def": {
"__cHei": 14,
Expand Down
2 changes: 1 addition & 1 deletion Assets/LDtkUnity/Samples~/Samples/AutoLayers_3_Mosaic.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"Ppu": 16,
"Rects": null,
"Def": {
"__cHei": 14,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"Ppu": 16,
"Rects": null,
"Def": {
"__cHei": 14,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"Ppu": 16,
"Rects": null,
"Def": {
"__cHei": 14,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/LDtkUnity/Samples~/Samples/Entities.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/LDtkUnity/Samples~/Samples/SeparateLevelFiles.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
8 changes: 4 additions & 4 deletions Assets/LDtkUnity/Samples~/Samples/WorldMap_Free_layout.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"iid": "a3619740-7820-11ed-b6fd-4b64aa0352a1",
"jsonVersion": "1.4.1",
"appBuildId": 471015,
"appBuildId": 471014,
"nextUid": 125,
"identifierStyle": "Capitalize",
"toc": [],
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -15044,4 +15044,4 @@
],
"worlds": [],
"dummyWorldIid": "ca0e9bf0-c640-11ed-ad34-5d947c1a0a9f"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
6 changes: 5 additions & 1 deletion Assets/Tools/SampleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit a3d612f

Please sign in to comment.