diff --git a/Assembly-CSharp-Editor.csproj b/Assembly-CSharp-Editor.csproj index 59175ec..4c9842e 100644 --- a/Assembly-CSharp-Editor.csproj +++ b/Assembly-CSharp-Editor.csproj @@ -52,7 +52,7 @@ - + /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index bb01da7..2c98625 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -71,7 +71,7 @@ - + /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll diff --git a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset index ce8e14f..04469d6 100644 --- a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset +++ b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Name: isometric_grass_and_water m_EditorClassIdentifier: Data: - Width: 20 - Height: 20 + Width: 50 + Height: 50 TileWidth: 64 TileHeight: 32 Orientation: 0 @@ -25,13 +25,13 @@ MonoBehaviour: OffsetX: 0 OffsetY: 0 Visible: 1 - Tiles: 010000000100000001000000010000000100000001000000010000000200000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d00000006000000010000000100000001000000050000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d00000006000000010000000100000001000000010000000100000001000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a000000110000001100000006000000010000000100000001000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a0000000600000001000000050000000900000018000000180000001800000018000000170000000b0000000c00000018000000180000001800000017000000170000001800000018000000170000001800000012000000010000001000000018000000180000001800000018000000180000000b000000070000001400000018000000170000001800000017000000180000001800000018000000180000001700000012000000010000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f0000000700000001000000080000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b00000007000000010000000100000001000000010000001400000018000000170000001200000001000000010000000400000008000000130000000c0000000b0000000c000000170000000b0000000700000001000000010000000100000001000000010000001000000017000000180000001200000004000000010000000100000001000000010000000800000007000000100000001700000012000000010000000100000001000000010000000100000001000000080000000f0000000f000000070000000300000003000000010000000200000002000000040000000500000009000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000004000000040000000500000009000000180000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d0000000900000018000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000100000001800000017000000170000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001400000017000000170000000b00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000080000000f0000000f00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000300000001000000030000000200000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000030000000100000004000000010000000100000001000000010000000100000001000000010000000100000001000000 + Tiles: 010000000100000001000000010000000100000001000000010000000200000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000020000000100000003000000010000000100000001000000010000000100000001000000010000000200000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d00000006000000010000000100000001000000050000000d000000060000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d00000006000000010000000100000001000000050000000d0000000600000001000000050000000d00000006000000010000000100000001000000050000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d0000000600000001000000010000000100000001000000010000000100000001000000010000000100000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000100000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d0000000600000001000000010000000100000001000000010000000100000014000000180000001800000018000000180000001800000018000000170000001700000001000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d00000006000000010000000100000001000000010000000100000001000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a00000011000000110000000600000001000000010000000100000010000000170000001800000018000000170000001800000017000000170000001800000001000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a000000110000001100000006000000010000000100000001000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a00000006000000010000000100000010000000170000001800000017000000180000001800000017000000170000001700000001000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a0000000600000001000000050000000900000018000000180000001800000018000000170000000b0000000c0000001800000018000000180000001700000017000000180000001800000017000000180000001200000001000000050000000900000018000000180000001800000018000000170000000b0000000c00000018000000050000000900000018000000180000001800000018000000170000000b0000000c00000018000000180000001800000017000000170000001800000018000000170000001800000012000000010000001000000018000000180000001800000018000000180000000b000000070000001400000018000000170000001800000017000000180000001800000018000000180000001700000012000000010000001000000018000000180000001800000018000000180000000b0000000700000014000000180000001000000018000000180000001800000018000000180000000b000000070000001400000018000000170000001800000017000000180000001800000018000000180000001700000012000000010000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f00000007000000010000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f0000000700000001000000080000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b00000007000000010000000100000001000000080000000c00000017000000180000000b0000000f00000007000000020000001000000017000000080000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b00000007000000010000000100000001000000010000001400000018000000170000001200000001000000010000000400000008000000130000000c0000000b0000000c000000170000000b000000070000000100000001000000010000000100000001000000140000001800000017000000120000000100000001000000040000000800000013000000010000001400000018000000170000001200000001000000010000000400000008000000130000000c0000000b0000000c000000170000000b0000000700000001000000010000000100000001000000010000001000000017000000180000001200000004000000010000000100000001000000010000000800000007000000100000001700000012000000010000000100000001000000010000000100000001000000100000001700000018000000120000000400000001000000010000000100000001000000010000001000000017000000180000001200000004000000010000000100000001000000010000000800000007000000100000001700000012000000010000000100000001000000010000000100000001000000080000000f0000000f000000070000000300000003000000010000000200000002000000040000000500000009000000180000000e000000010000000100000001000000010000000100000001000000080000000f0000000f00000007000000030000000300000001000000020000000200000001000000080000000f0000000f000000070000000300000003000000010000000200000002000000040000000500000009000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000004000000040000000500000009000000180000000b00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000400000004000000010000000100000001000000010000000100000001000000010000000100000004000000040000000500000009000000180000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d0000000900000018000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d0000000100000001000000010000000100000001000000010000000100000001000000050000000d0000000900000018000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000100000001800000017000000170000000b00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000010000000180000000100000001000000010000000100000001000000010000000100000001000000100000001800000017000000170000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001400000017000000170000000b00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000140000001700000001000000010000000100000001000000010000000100000001000000010000001400000017000000170000000b00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000080000000f0000000f0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000080000000f0000000100000001000000010000000100000001000000010000000100000001000000080000000f0000000f00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000300000001000000030000000200000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000300000001000000030000000200000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000030000000100000004000000010000000100000001000000010000000100000001000000010000000100000001000000010000000500000006000000050000000600000005000000060000000100000003000000050000000600000001000000010000000100000001000000010000000100000002000000010000000300000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000200000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000100000003000000140000000a000000090000001200000008000000070000000200000005000000090000000e000000050000000d00000006000000010000000100000001000000050000000d000000060000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d00000006000000010000000100000001000000050000000d0000000600000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001400000018000000170000001200000001000000010000000400000008000000130000000700000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d0000000600000001000000010000000100000001000000010000000100000001000000010000000100000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d0000000600000001000000010000000100000001000000010000000100000001000000010000000100000010000000170000001800000012000000040000000100000001000000010000000100000001000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d00000006000000010000000100000001000000010000000100000001000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d00000006000000010000000100000001000000010000000100000001000000080000000f0000000f00000007000000030000000300000001000000020000000200000001000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a000000110000001100000006000000010000000100000001000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a00000011000000110000000600000001000000010000000100000001000000010000000100000001000000010000000100000001000000040000000400000001000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a000000060000000100000001000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a00000006000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d000000050000000900000018000000180000001800000018000000170000000b0000000c0000001800000018000000180000001700000017000000180000001800000017000000180000001200000001000000050000000900000018000000180000001800000018000000170000000b0000000c0000001800000018000000180000001700000017000000180000001800000017000000180000001200000001000000010000000100000001000000010000000100000001000000010000000100000010000000180000001000000018000000180000001800000018000000180000000b000000070000001400000018000000170000001800000017000000180000001800000018000000180000001700000012000000010000001000000018000000180000001800000018000000180000000b00000007000000140000001800000017000000180000001700000018000000180000001800000018000000170000001200000001000000010000000100000001000000010000000100000001000000010000000100000014000000170000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f00000007000000010000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f00000007000000010000000100000001000000010000000100000001000000010000000100000001000000080000000f000000080000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b00000007000000010000000100000001000000080000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000300000001000000010000001400000018000000170000001200000001000000010000000400000008000000130000000c0000000b0000000c000000170000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000200000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000200000001000000030000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d00000006000000010000000100000001000000050000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000500000006000000050000000d00000006000000010000000100000001000000050000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d000000060000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000080000000700000014000000170000000a0000000d0000000d0000000d00000009000000170000000a0000000d00000006000000010000000100000001000000010000000100000001000000010000000100000001000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d0000000600000001000000010000000100000001000000050000000d0000000d000000060000000100000001000000010000000100000001000000010000000500000006000000140000001800000018000000180000001800000018000000180000001700000017000000170000000a0000000d0000000d00000006000000010000000100000001000000010000000100000001000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a00000011000000110000000600000001000000080000000c000000170000000a0000001100000011000000060000000100000001000000010000000800000007000000100000001700000018000000180000001700000018000000170000001700000018000000170000001800000018000000170000000a000000110000001100000006000000010000000100000001000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a000000060000000500000009000000170000001700000018000000170000000a0000000600000001000000010000000500000006000000100000001700000018000000170000001800000018000000170000001700000017000000180000001800000017000000170000001700000018000000170000000a0000000600000001000000050000000900000018000000180000001800000018000000170000000b0000000c00000018000000180000001800000017000000170000001800000018000000170000001800000012000000080000000c000000170000001800000018000000170000001800000012000000010000000500000015000000160000000900000018000000180000001800000018000000170000000b0000000c00000018000000180000001800000017000000170000001800000018000000170000001800000012000000010000001000000018000000180000001800000018000000180000000b000000070000001400000018000000170000001800000017000000180000001800000018000000180000001700000012000000050000000900000018000000180000001800000018000000170000001200000001000000100000000a0000000900000018000000180000001800000018000000180000000b000000070000001400000018000000170000001800000017000000180000001800000018000000180000001700000012000000010000001400000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f00000007000000080000000c0000001800000018000000170000000b0000000f0000000700000001000000080000000c0000001700000018000000180000001700000017000000170000000e0000000100000014000000180000001800000018000000180000001800000018000000170000000b0000000f0000000700000001000000080000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b000000070000000100000001000000050000000900000017000000180000000b0000000700000001000000010000000100000004000000100000000b0000000c00000017000000180000000b0000000f0000000700000002000000100000001700000017000000180000001800000017000000180000000b00000007000000010000000100000001000000010000001400000018000000170000001200000001000000010000000400000008000000130000000c0000000b0000000c000000170000000b00000007000000010000000100000001000000080000000c000000170000000b00000007000000010000000100000001000000010000000100000008000000070000001400000018000000170000001200000001000000010000000400000008000000130000000c0000000b0000000c000000170000000b0000000700000001000000010000000100000001000000010000001000000017000000180000001200000004000000010000000100000001000000010000000800000007000000100000001700000012000000010000000100000001000000010000000100000010000000170000001200000001000000010000001900000019000000190000000100000005000000060000001000000017000000180000001200000004000000010000000100000001000000010000000800000007000000100000001700000012000000010000000100000001000000010000000100000001000000080000000f0000000f000000070000000300000003000000010000000200000002000000040000000500000009000000180000000e0000000100000001000000010000000100000005000000150000000c0000000e0000000100000001000000190000001900000019000000010000000800000007000000080000000f0000000f000000070000000300000003000000010000000200000002000000040000000500000009000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000004000000040000000500000009000000180000000b0000000700000001000000010000000100000001000000100000000a000000150000000700000001000000010000001900000019000000190000000100000001000000010000000100000001000000010000000100000001000000010000000100000004000000040000000500000009000000180000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d0000000900000018000000180000000e0000000100000001000000010000000100000001000000080000000c0000000e00000001000000010000000100000019000000190000001900000001000000010000000100000001000000010000000100000001000000010000000100000001000000050000000d0000000900000018000000180000000e0000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000100000001800000017000000170000000b00000007000000010000000100000001000000010000000100000005000000150000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000100000001800000017000000170000000b0000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001400000017000000170000000b00000007000000010000000100000001000000010000000100000001000000080000000700000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001400000017000000170000000b00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000080000000f0000000f000000070000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000080000000f0000000f00000007000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000300000001000000030000000200000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000300000001000000030000000200000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000030000000100000004000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000030000000100000004000000010000000100000001000000010000000100000001000000010000000100000001000000 Properties: [] - Name: Tile Layer 2 OffsetX: 0 OffsetY: -100 Visible: 0 - Tiles: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + Tiles: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000001900000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000001900000019000000000000001900000019000000190000001900000019000000190000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000019000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000001900000019000000190000001900000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190000001900000019000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000019000000190000001900000019000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Properties: - em - @@ -51,5 +51,20 @@ MonoBehaviour: Properties: - tileset prop - hgf + - FirstGid: 25 + Name: tileset2 + Margin: 0 + Spacing: 0 + TileWidth: 64 + TileHeight: 64 + TileCount: 24 + TileOffsetX: 0 + TileOffsetY: 16 + ImageSource: isometric_grass_and_water2.png + Properties: + - jjg + - nhhh + - tilese + - jg Name: isometric_grass_and_water PixelsPerUnit: 100 diff --git a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset.meta b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset.meta index 22d8477..73148e9 100644 --- a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset.meta +++ b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 7b6bd76df16f04c1aadbdf1c8812c49a -timeCreated: 1454257185 +timeCreated: 1454766908 licenseType: Free NativeFormatImporter: userData: diff --git a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.png.meta b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.png.meta index c70de00..1ebb88b 100644 --- a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.png.meta +++ b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.png.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 221bc03dca62748f284639c0b399875b -timeCreated: 1454758669 +timeCreated: 1454796632 licenseType: Free TextureImporter: fileIDToRecycleName: diff --git a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.tmx b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.tmx index f35677e..313a186 100644 --- a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.tmx +++ b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water.tmx @@ -1,5 +1,5 @@ - + @@ -40,8 +40,46 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -83,6 +121,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -123,6 +221,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -146,6 +274,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,6 +370,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -222,6 +470,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -263,6 +571,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -303,6 +671,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -350,6 +778,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -370,6 +828,1566 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -410,6 +2428,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -442,9 +2520,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -721,9 +2829,6 @@ - - - @@ -741,9 +2846,6 @@ - - - @@ -761,9 +2863,2115 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water2.png b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water2.png new file mode 100644 index 0000000..7a878f7 Binary files /dev/null and b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water2.png differ diff --git a/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water2.png.meta b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water2.png.meta new file mode 100644 index 0000000..0388f12 --- /dev/null +++ b/Assets/IsoTools/Tiled/Examples/Maps/isometric_grass_and_water2.png.meta @@ -0,0 +1,562 @@ +fileFormatVersion: 2 +guid: e7e6bc4bffa144ad4863e494f08333a4 +timeCreated: 1454796632 +licenseType: Free +TextureImporter: + fileIDToRecycleName: + 21300000: isometric_grass_and_water2_25 + 21300002: isometric_grass_and_water2_26 + 21300004: isometric_grass_and_water2_27 + 21300006: isometric_grass_and_water2_28 + 21300008: isometric_grass_and_water2_29 + 21300010: isometric_grass_and_water2_30 + 21300012: isometric_grass_and_water2_31 + 21300014: isometric_grass_and_water2_32 + 21300016: isometric_grass_and_water2_33 + 21300018: isometric_grass_and_water2_34 + 21300020: isometric_grass_and_water2_35 + 21300022: isometric_grass_and_water2_36 + 21300024: isometric_grass_and_water2_37 + 21300026: isometric_grass_and_water2_38 + 21300028: isometric_grass_and_water2_39 + 21300030: isometric_grass_and_water2_40 + 21300032: isometric_grass_and_water2_41 + 21300034: isometric_grass_and_water2_42 + 21300036: isometric_grass_and_water2_43 + 21300038: isometric_grass_and_water2_44 + 21300040: isometric_grass_and_water2_45 + 21300042: isometric_grass_and_water2_46 + 21300044: isometric_grass_and_water2_47 + 21300046: isometric_grass_and_water2_48 + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: + - name: isometric_grass_and_water2_25 + rect: + serializedVersion: 2 + x: 0 + y: 320 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -17, y: 30} + - {x: -32, y: 16} + - {x: -32, y: -4} + - {x: -5, y: -19} + - {x: 3, y: -19} + - {x: 32, y: -4} + - {x: 32, y: 21} + - {x: 12, y: 30} + - name: isometric_grass_and_water2_26 + rect: + serializedVersion: 2 + x: 64 + y: 320 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: 4, y: 30} + - {x: -12, y: 30} + - {x: -32, y: 17} + - {x: -32, y: -7} + - {x: -2, y: -19} + - {x: 4, y: -19} + - {x: 32, y: -3} + - {x: 32, y: 17} + - {x: 19, y: 25} + - name: isometric_grass_and_water2_27 + rect: + serializedVersion: 2 + x: 128 + y: 320 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: 10, y: 29} + - {x: -11, y: 29} + - {x: -32, y: 20} + - {x: -32, y: -4} + - {x: -4, y: -19} + - {x: 1, y: -19} + - {x: 32, y: -3} + - {x: 32, y: 15} + - {x: 30, y: 17} + - name: isometric_grass_and_water2_28 + rect: + serializedVersion: 2 + x: 192 + y: 320 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -7, y: 30} + - {x: -26, y: 20} + - {x: -32, y: 15} + - {x: -32, y: -3} + - {x: -4, y: -19} + - {x: 1, y: -19} + - {x: 32, y: -4} + - {x: 32, y: 16} + - {x: 12, y: 30} + - name: isometric_grass_and_water2_29 + rect: + serializedVersion: 2 + x: 0 + y: 256 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -11, y: 29} + - {x: -32, y: 16} + - {x: -32, y: -8} + - {x: -9, y: -24} + - {x: 9, y: -24} + - {x: 25, y: -19} + - {x: 32, y: -7} + - {x: 32, y: 20} + - {x: 17, y: 29} + - name: isometric_grass_and_water2_30 + rect: + serializedVersion: 2 + x: 64 + y: 256 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -32, y: -10} + - {x: -10, y: -19} + - {x: 6, y: -19} + - {x: 32, y: -7} + - {x: 32, y: 31} + - {x: -32, y: 31} + - name: isometric_grass_and_water2_31 + rect: + serializedVersion: 2 + x: 128 + y: 256 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: 5, y: 30} + - {x: -28, y: 24} + - {x: -32, y: 14} + - {x: -32, y: -6} + - {x: -1, y: -19} + - {x: 4, y: -19} + - {x: 32, y: -3} + - {x: 32, y: 17} + - {x: 18, y: 30} + - name: isometric_grass_and_water2_32 + rect: + serializedVersion: 2 + x: 192 + y: 256 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -16, y: 27} + - {x: -32, y: 25} + - {x: -32, y: -11} + - {x: -6, y: -19} + - {x: 25, y: -19} + - {x: 32, y: -10} + - {x: 32, y: 1} + - {x: 20, y: 27} + - name: isometric_grass_and_water2_33 + rect: + serializedVersion: 2 + x: 0 + y: 192 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -11, y: 29} + - {x: -12, y: 24} + - {x: -12, y: 23} + - {x: -14, y: 20} + - {x: -14, y: 15} + - {x: -14, y: 16} + - {x: -15, y: 23} + - {x: -28, y: 19} + - {x: -32, y: 1} + - {x: -32, y: -11} + - {x: -7, y: -24} + - {x: 2, y: -24} + - {x: 32, y: -11} + - {x: 32, y: 2} + - {x: 13, y: 29} + - name: isometric_grass_and_water2_34 + rect: + serializedVersion: 2 + x: 64 + y: 192 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: 3, y: 23} + - {x: -32, y: 5} + - {x: -32, y: -9} + - {x: -5, y: -24} + - {x: 10, y: -24} + - {x: 32, y: -7} + - {x: 32, y: 13} + - {x: 28, y: 23} + - name: isometric_grass_and_water2_35 + rect: + serializedVersion: 2 + x: 128 + y: 192 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -6, y: 19} + - {x: -14, y: 16} + - {x: -19, y: 14} + - {x: -32, y: -1} + - {x: -32, y: -12} + - {x: -13, y: -19} + - {x: 11, y: -19} + - {x: 14, y: -18} + - {x: 32, y: -10} + - {x: 32, y: 0} + - {x: 4, y: 19} + - name: isometric_grass_and_water2_36 + rect: + serializedVersion: 2 + x: 192 + y: 192 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -18, y: 27} + - {x: -32, y: 21} + - {x: -32, y: -8} + - {x: -11, y: -24} + - {x: 16, y: -24} + - {x: 32, y: -10} + - {x: 32, y: 4} + - {x: 5, y: 27} + - name: isometric_grass_and_water2_37 + rect: + serializedVersion: 2 + x: 0 + y: 128 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -12, y: 28} + - {x: -14, y: 24} + - {x: -15, y: 19} + - {x: -32, y: -1} + - {x: -32, y: -9} + - {x: -5, y: -24} + - {x: 10, y: -24} + - {x: 32, y: -7} + - {x: 32, y: 13} + - {x: 19, y: 28} + - name: isometric_grass_and_water2_38 + rect: + serializedVersion: 2 + x: 64 + y: 128 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -21, y: 25} + - {x: -32, y: 4} + - {x: -32, y: -16} + - {x: -27, y: -19} + - {x: 2, y: -19} + - {x: 32, y: -9} + - {x: 32, y: 25} + - name: isometric_grass_and_water2_39 + rect: + serializedVersion: 2 + x: 128 + y: 128 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -32, y: -3} + - {x: -15, y: -19} + - {x: 28, y: -19} + - {x: 32, y: -17} + - {x: 32, y: 0} + - {x: 11, y: 28} + - {x: 6, y: 29} + - {x: -21, y: 29} + - {x: -32, y: 16} + - name: isometric_grass_and_water2_40 + rect: + serializedVersion: 2 + x: 192 + y: 128 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -9, y: 32} + - {x: -32, y: 15} + - {x: -32, y: -10} + - {x: -10, y: -24} + - {x: 14, y: -24} + - {x: 32, y: -9} + - {x: 32, y: 0} + - {x: 12, y: 32} + - name: isometric_grass_and_water2_41 + rect: + serializedVersion: 2 + x: 0 + y: 64 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -9, y: 30} + - {x: -11, y: 26} + - {x: -15, y: 15} + - {x: -32, y: -2} + - {x: -32, y: -9} + - {x: -5, y: -24} + - {x: 10, y: -24} + - {x: 32, y: -8} + - {x: 32, y: 17} + - {x: 9, y: 30} + - name: isometric_grass_and_water2_42 + rect: + serializedVersion: 2 + x: 64 + y: 64 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -2, y: 23} + - {x: -32, y: -2} + - {x: -32, y: -10} + - {x: -10, y: -19} + - {x: 5, y: -19} + - {x: 32, y: -4} + - {x: 32, y: 17} + - {x: 19, y: 23} + - name: isometric_grass_and_water2_43 + rect: + serializedVersion: 2 + x: 128 + y: 64 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -21, y: 26} + - {x: -32, y: 14} + - {x: -32, y: -4} + - {x: -10, y: -19} + - {x: 13, y: -19} + - {x: 32, y: -12} + - {x: 32, y: 8} + - {x: 6, y: 26} + - name: isometric_grass_and_water2_44 + rect: + serializedVersion: 2 + x: 192 + y: 64 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -25, y: 32} + - {x: -32, y: 19} + - {x: -32, y: -14} + - {x: -3, y: -24} + - {x: 6, y: -24} + - {x: 32, y: -9} + - {x: 32, y: 0} + - {x: 7, y: 32} + - name: isometric_grass_and_water2_45 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -12, y: 29} + - {x: -14, y: 20} + - {x: -14, y: 15} + - {x: -14, y: 16} + - {x: -15, y: 23} + - {x: -27, y: 19} + - {x: -32, y: 2} + - {x: -32, y: -12} + - {x: -15, y: -19} + - {x: 14, y: -19} + - {x: 32, y: -13} + - {x: 32, y: 0} + - {x: 21, y: 23} + - {x: 14, y: 29} + - name: isometric_grass_and_water2_46 + rect: + serializedVersion: 2 + x: 64 + y: 0 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -16, y: 27} + - {x: -18, y: 26} + - {x: -32, y: 18} + - {x: -32, y: -6} + - {x: -8, y: -24} + - {x: 11, y: -24} + - {x: 27, y: -20} + - {x: 32, y: -5} + - {x: 32, y: 18} + - {x: 21, y: 27} + - name: isometric_grass_and_water2_47 + rect: + serializedVersion: 2 + x: 128 + y: 0 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -1, y: 14} + - {x: -32, y: -1} + - {x: -32, y: -11} + - {x: -2, y: -24} + - {x: 7, y: -24} + - {x: 32, y: -10} + - {x: 32, y: 0} + - {x: 4, y: 14} + - name: isometric_grass_and_water2_48 + rect: + serializedVersion: 2 + x: 192 + y: 0 + width: 64 + height: 64 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: + - - {x: -1, y: 14} + - {x: -32, y: -1} + - {x: -32, y: -11} + - {x: -2, y: -24} + - {x: 7, y: -24} + - {x: 32, y: -10} + - {x: 32, y: 0} + - {x: 4, y: 14} + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/IsoTools/Tiled/Examples/Scenes/TiledScene.unity b/Assets/IsoTools/Tiled/Examples/Scenes/TiledScene.unity index c6339f3..3eb1b3e 100644 --- a/Assets/IsoTools/Tiled/Examples/Scenes/TiledScene.unity +++ b/Assets/IsoTools/Tiled/Examples/Scenes/TiledScene.unity @@ -146,7 +146,7 @@ Camera: far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 6 + orthographic size: 15 m_Depth: -1 m_CullingMask: serializedVersion: 2 diff --git a/Assets/IsoTools/Tiled/Internal/Editor/TiledMapAssetEditor.cs b/Assets/IsoTools/Tiled/Internal/Editor/TiledMapAssetEditor.cs index 9024286..1d8f902 100644 --- a/Assets/IsoTools/Tiled/Internal/Editor/TiledMapAssetEditor.cs +++ b/Assets/IsoTools/Tiled/Internal/Editor/TiledMapAssetEditor.cs @@ -5,6 +5,7 @@ using IsoTools.Internal; using System; using System.IO; using System.Linq; +using System.Collections.Generic; namespace IsoTools.Tiled.Internal { [CustomEditor(typeof(TiledMapAsset))] @@ -17,21 +18,34 @@ namespace IsoTools.Tiled.Internal { // // ------------------------------------------------------------------------ - void CreateTiledMap(GameObject map_go) { - var iso_object = map_go.AddComponent(); - iso_object.mode = IsoObject.Mode.Mode3d; - iso_object.position = Vector3.zero; - iso_object.size = IsoUtils.Vec3FromXY(_asset.Data.Height, _asset.Data.Width); + void CreateTiledMapOnScene() { + var map_go = new GameObject(_asset.Name); + try { + CreateTiledMap(map_go); + } catch ( Exception e ) { + Debug.LogErrorFormat("Create tiled map error: {0}", e.Message); + DestroyImmediate(map_go, true); + } + Undo.RegisterCreatedObjectUndo(map_go, "Create Tiled Map"); + } - var tiled_map = map_go.AddComponent(); + void CreateTiledMap(GameObject map_go) { + var map_data = _asset.Data; + + var iso_object = map_go.AddComponent(); + iso_object.mode = IsoObject.Mode.Mode3d; + iso_object.position = Vector3.zero; + iso_object.size = IsoUtils.Vec3FromXY(map_data.Height, map_data.Width); + + var tiled_map = map_go.AddComponent(); tiled_map.Asset = _asset; - tiled_map.Properties = new TiledMapProperties(_asset.Data.Properties); - for ( int i = 0, e = _asset.Data.Layers.Count; i < e; ++i ) { - CreateTiledMapLayer(tiled_map, i); + tiled_map.Properties = new TiledMapProperties(map_data.Properties); + for ( int i = map_data.Layers.Count - 1; i >= 0; --i ) { + CreateTiledLayer(tiled_map, i); } } - void CreateTiledMapLayer(TiledMap map, int layer_index) { + void CreateTiledLayer(TiledMap map, int layer_index) { var layer_data = _asset.Data.Layers[layer_index]; var layer_go = new GameObject(layer_data.Name); @@ -41,114 +55,157 @@ namespace IsoTools.Tiled.Internal { -layer_data.OffsetY / _asset.PixelsPerUnit); layer_go.SetActive(layer_data.Visible); - var tiled_layer = layer_go.AddComponent(); + var tiled_layer = layer_go.AddComponent(); tiled_layer.Asset = _asset; tiled_layer.Properties = new TiledMapProperties(layer_data.Properties); + for ( int i = 0, e = _asset.Data.Tilesets.Count; i < e; ++i ) { + CreateTiledTileset(tiled_layer, layer_index, i); + } + } + + void CreateTiledTileset(TiledMapLayer layer, int layer_index, int tileset_index) { + var tileset_data = _asset.Data.Tilesets[tileset_index]; + + var tileset_go = new GameObject(tileset_data.Name); + tileset_go.transform.SetParent(layer.transform, false); + + var tiled_tileset = tileset_go.AddComponent(); + tiled_tileset.Asset = _asset; + tiled_tileset.Properties = new TiledMapProperties(tileset_data.Properties); + CreateTiledTilesetMesh(tiled_tileset, tileset_index, layer_index); + } + + void CreateTiledTilesetMesh(TiledMapTileset tileset, int tileset_index, int layer_index) { + var mesh_filter = tileset.gameObject.AddComponent(); + mesh_filter.mesh = GetTilesetMesh(tileset_index, layer_index); + var mesh_renderer = tileset.gameObject.AddComponent(); + mesh_renderer.sharedMaterial = GetTilesetMaterial(tileset_index); + } + + Mesh GetTilesetMesh(int tileset_index, int layer_index) { + var vertices = new List(); + var triangles = new List(); + var uvs = new List(); for ( var tile_y = 0; tile_y < _asset.Data.Height; ++tile_y ) { for ( var tile_x = 0; tile_x < _asset.Data.Width; ++tile_x ) { - CreateTileMapTile(tiled_layer, layer_index, tile_x, tile_y); + var tile_gid = _asset.Data + .Layers[layer_index] + .Tiles[tile_y * _asset.Data.Width + tile_x]; + if ( tile_gid > 0 && CheckTileGidByTileset(tile_gid, tileset_index) ) { + var tile_iso_pos = new Vector3( + -tile_y + _asset.Data.Height - 1, + -tile_x + _asset.Data.Width - 1); + + var iso_world = GetIsoWorld(); + var tile_screen_pos = iso_world.IsoToScreen(tile_iso_pos); + var tile_sprite = GetTileSprite(tile_gid, tileset_index); + var tile_width = tile_sprite.rect.width / _asset.PixelsPerUnit; + var tile_height = tile_sprite.rect.height / _asset.PixelsPerUnit; + var tileset_data = _asset.Data.Tilesets[tileset_index]; + var tileset_offset_x = tileset_data.TileOffsetX / _asset.PixelsPerUnit; + var tileset_offset_y = tileset_data.TileOffsetY / _asset.PixelsPerUnit; + + var vertex_pos = + IsoUtils.Vec3FromVec2(tile_screen_pos) - + IsoUtils.Vec3FromXY(tile_width, tile_height) * 0.5f + + IsoUtils.Vec3FromXY(tileset_offset_x, tileset_offset_y); + + vertices.Add(vertex_pos); + vertices.Add(vertex_pos + IsoUtils.Vec3FromX (tile_width)); + vertices.Add(vertex_pos + IsoUtils.Vec3FromXY(tile_width, tile_height)); + vertices.Add(vertex_pos + IsoUtils.Vec3FromY (tile_height)); + + triangles.Add(vertices.Count - 4 + 2); + triangles.Add(vertices.Count - 4 + 1); + triangles.Add(vertices.Count - 4 + 0); + triangles.Add(vertices.Count - 4 + 0); + triangles.Add(vertices.Count - 4 + 3); + triangles.Add(vertices.Count - 4 + 2); + + var tex_size = new Vector2(tile_sprite.texture.width, tile_sprite.texture.height); + uvs.Add(new Vector2(tile_sprite.rect.xMin / tex_size.x, tile_sprite.rect.yMin / tex_size.y)); + uvs.Add(new Vector2(tile_sprite.rect.xMax / tex_size.x, tile_sprite.rect.yMin / tex_size.y)); + uvs.Add(new Vector2(tile_sprite.rect.xMax / tex_size.x, tile_sprite.rect.yMax / tex_size.y)); + uvs.Add(new Vector2(tile_sprite.rect.xMin / tex_size.x, tile_sprite.rect.yMax / tex_size.y)); + } } } + var mesh = new Mesh(); + mesh.vertices = vertices.ToArray(); + mesh.triangles = triangles.ToArray(); + mesh.uv = uvs.ToArray(); + mesh.RecalculateNormals(); + return mesh; } - void CreateTileMapTile(TiledMapLayer layer, int layer_index, int tile_x, int tile_y) { - var layer_data = _asset.Data.Layers[layer_index]; - - var tile_gid = layer_data.Tiles[tile_y * _asset.Data.Width + tile_x]; - if ( tile_gid > 0 ) { - var asset_path = AssetDatabase.GetAssetPath(_asset); - if ( string.IsNullOrEmpty(asset_path) ) { - throw new UnityException(string.Format( - "not found tiled map asset ({0}) path", - _asset.name)); - } - - var iso_world = GameObject.FindObjectOfType(); - if ( !iso_world ) { - throw new UnityException("not found IsoWorld"); - } - - var tileset = FindTilesetByTileGid(tile_gid); - if ( tileset == null ) { - throw new UnityException(string.Format( - "tileset for tile ({0}) on layer ({1}) not found", - tile_gid, layer_data.Name)); - } - - var tile_tileset_sprite_name = string.Format( - "{0}_{1}", - Path.GetFileNameWithoutExtension(tileset.ImageSource), - tile_gid); - var tileset_assets = AssetDatabase.LoadAllAssetsAtPath( - Path.Combine(Path.GetDirectoryName(asset_path), tileset.ImageSource)); - var tile_sprite = tileset_assets - .Where(p => p is Sprite && p.name == tile_tileset_sprite_name) - .Select(p => p as Sprite) - .FirstOrDefault(); - if ( !tile_sprite ) { - throw new UnityException(string.Format( - "sprite ({0}) for tile ({1}) on layer ({2}) not found", - tile_tileset_sprite_name, tile_gid, layer_data.Name)); - } - - var iso_x = -tile_y + _asset.Data.Height - 1; - var iso_y = -tile_x + _asset.Data.Width - 1; - - var tile_go = new GameObject(string.Format( - "Tile_{0}_{1}", iso_x, iso_y)); - tile_go.transform.SetParent(layer.transform, false); - - tile_go.transform.localPosition = - iso_world.IsoToScreen(IsoUtils.Vec3FromXY(iso_x, iso_y)); - - tile_go.transform.localPosition += new Vector3( - tileset.TileOffsetX / _asset.PixelsPerUnit, - tileset.TileOffsetY / _asset.PixelsPerUnit, - (iso_x + iso_y + layer_index) * iso_world.stepDepth); - - var tiled_tile = tile_go.AddComponent(); - tiled_tile.Asset = _asset; - tiled_tile.Properties = new TiledMapProperties(tileset.Properties); - - var tile_spr = tile_go.AddComponent(); - tile_spr.sprite = tile_sprite; + IsoWorld GetIsoWorld() { + var iso_world = GameObject.FindObjectOfType(); + if ( !iso_world ) { + throw new UnityException("not found IsoWorld"); } + return iso_world; } - TiledMapTilesetData FindTilesetByTileGid(int tile_gid) { - return _asset.Data.Tilesets.Find(p => { - return tile_gid >= p.FirstGid && tile_gid < p.FirstGid + p.TileCount; - }); - } - - // ------------------------------------------------------------------------ - // - // Functions - // - // ------------------------------------------------------------------------ - - void CreateTiledMapPrefab() { - var tiled_map = CreateTiledMapOnScene(); - if ( tiled_map ) { - var asset_path = AssetDatabase.GetAssetPath(_asset); - var prefab_path = Path.Combine(Path.GetDirectoryName(asset_path), _asset.Name + ".prefab"); - PrefabUtility.CreatePrefab(prefab_path, tiled_map); - DestroyImmediate(tiled_map, true); - /// \TODO undo support + string GetTiledMapAssetPath() { + var asset_path = AssetDatabase.GetAssetPath(_asset); + if ( string.IsNullOrEmpty(asset_path) ) { + throw new UnityException(string.Format( + "not found tiled map asset ({0}) path", + _asset.name)); } + return asset_path; } - GameObject CreateTiledMapOnScene() { - var map_go = new GameObject(_asset.Name); - try { - CreateTiledMap(map_go); - } catch ( Exception e ) { - Debug.LogErrorFormat("Create tiled map error: {0}", e.Message); - DestroyImmediate(map_go, true); - map_go = null; + bool CheckTileGidByTileset(int tile_gid, int tileset_index) { + var tileset_data = _asset.Data.Tilesets[tileset_index]; + return + tile_gid >= tileset_data.FirstGid && + tile_gid < tileset_data.FirstGid + tileset_data.TileCount; + } + + Sprite GetTileSprite(int tile_gid, int tileset_index) { + var tileset_data = _asset.Data.Tilesets[tileset_index]; + var tile_sprite_name = string.Format( + "{0}_{1}", + Path.GetFileNameWithoutExtension(tileset_data.ImageSource), + tile_gid); + var tileset_assets = AssetDatabase.LoadAllAssetsAtPath(Path.Combine( + Path.GetDirectoryName(GetTiledMapAssetPath()), + tileset_data.ImageSource)); + var tile_sprite = tileset_assets + .Where(p => p is Sprite && p.name == tile_sprite_name) + .Select(p => p as Sprite) + .FirstOrDefault(); + if ( !tile_sprite ) { + throw new UnityException(string.Format( + "sprite ({0}) for tile ({1}) not found", + tile_sprite_name, tile_gid)); } - Undo.RegisterCreatedObjectUndo(map_go, "Create TiledMap"); - return map_go; + return tile_sprite; + } + + Material GetTilesetMaterial(int tileset_index) { + var shader = Shader.Find("Sprites/Default"); + if ( !shader ) { + throw new UnityException("'Sprites/Default' shader not found"); + } + var material = new Material(shader); + material.SetTexture("_MainTex", GetTilesetTexture(tileset_index)); + return material; + } + + Texture2D GetTilesetTexture(int tileset_index) { + var tileset_data = _asset.Data.Tilesets[tileset_index]; + var texture_path = Path.Combine( + Path.GetDirectoryName(GetTiledMapAssetPath()), + tileset_data.ImageSource); + var texture = AssetDatabase.LoadAssetAtPath(texture_path); + if ( !texture ) { + throw new UnityException(string.Format( + "texture ({0}) for tileset ({1}) not found", + texture_path, tileset_data.Name)); + } + return texture; } // ------------------------------------------------------------------------ @@ -163,14 +220,9 @@ namespace IsoTools.Tiled.Internal { public override void OnInspectorGUI() { DrawDefaultInspector(); - EditorGUILayout.BeginHorizontal(); - if ( GUILayout.Button("Create map prefab") ) { - CreateTiledMapPrefab(); - } - if ( GUILayout.Button("Create map on scene") ) { + if ( GUILayout.Button("Create tiled map on scene") ) { CreateTiledMapOnScene(); } - EditorGUILayout.EndHorizontal(); } } } diff --git a/Assets/IsoTools/Tiled/Internal/Editor/TiledMapTileEditor.cs b/Assets/IsoTools/Tiled/Internal/Editor/TiledMapTilesetEditor.cs similarity index 71% rename from Assets/IsoTools/Tiled/Internal/Editor/TiledMapTileEditor.cs rename to Assets/IsoTools/Tiled/Internal/Editor/TiledMapTilesetEditor.cs index 1ec76c1..52d58a2 100644 --- a/Assets/IsoTools/Tiled/Internal/Editor/TiledMapTileEditor.cs +++ b/Assets/IsoTools/Tiled/Internal/Editor/TiledMapTilesetEditor.cs @@ -4,9 +4,9 @@ using IsoTools.Tiled; using IsoTools.Internal; namespace IsoTools.Tiled.Internal { - [CustomEditor(typeof(TiledMapTile)), CanEditMultipleObjects] + [CustomEditor(typeof(TiledMapTileset)), CanEditMultipleObjects] class TiledMapTileEditor : Editor { - TiledMapTile _tile = null; + TiledMapTileset _tileset = null; // ------------------------------------------------------------------------ // @@ -21,13 +21,13 @@ namespace IsoTools.Tiled.Internal { // ------------------------------------------------------------------------ void OnEnable() { - _tile = target as TiledMapTile; + _tileset = target as TiledMapTileset; } public override void OnInspectorGUI() { DrawDefaultInspector(); - if ( _tile && _tile.Properties != null ) { - _tile.Properties.OnInspectorGUI("Tileset properties"); + if ( _tileset && _tileset.Properties != null ) { + _tileset.Properties.OnInspectorGUI("Tileset properties"); } } } diff --git a/Assets/IsoTools/Tiled/Internal/Editor/TiledMapTileEditor.cs.meta b/Assets/IsoTools/Tiled/Internal/Editor/TiledMapTilesetEditor.cs.meta similarity index 100% rename from Assets/IsoTools/Tiled/Internal/Editor/TiledMapTileEditor.cs.meta rename to Assets/IsoTools/Tiled/Internal/Editor/TiledMapTilesetEditor.cs.meta diff --git a/Assets/IsoTools/Tiled/TiledMapTile.cs b/Assets/IsoTools/Tiled/TiledMapTileset.cs similarity index 86% rename from Assets/IsoTools/Tiled/TiledMapTile.cs rename to Assets/IsoTools/Tiled/TiledMapTileset.cs index 09ddce0..e61c015 100644 --- a/Assets/IsoTools/Tiled/TiledMapTile.cs +++ b/Assets/IsoTools/Tiled/TiledMapTileset.cs @@ -8,7 +8,7 @@ using UnityEditor; namespace IsoTools.Tiled { [ExecuteInEditMode, DisallowMultipleComponent] - public class TiledMapTile : MonoBehaviour { + public class TiledMapTileset : MonoBehaviour { public TiledMapAsset Asset = null; public TiledMapProperties Properties = null; diff --git a/Assets/IsoTools/Tiled/TiledMapTile.cs.meta b/Assets/IsoTools/Tiled/TiledMapTileset.cs.meta similarity index 76% rename from Assets/IsoTools/Tiled/TiledMapTile.cs.meta rename to Assets/IsoTools/Tiled/TiledMapTileset.cs.meta index 9b63a76..e36f08c 100644 --- a/Assets/IsoTools/Tiled/TiledMapTile.cs.meta +++ b/Assets/IsoTools/Tiled/TiledMapTileset.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 6aede06b08d82497586194285ed30f71 -timeCreated: 1454274398 +guid: 771457a2414954117b1fbe3a1178f023 +timeCreated: 1454774218 licenseType: Free MonoImporter: serializedVersion: 2 diff --git a/UnityIso.userprefs b/UnityIso.userprefs index 8535ea8..fbeb4d4 100644 --- a/UnityIso.userprefs +++ b/UnityIso.userprefs @@ -2,10 +2,9 @@ - - - - + + +