From 236e72d8797d35d84216c88a8a9dd0329c2c0ea8 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Mon, 19 Dec 2016 02:30:30 +0700 Subject: [PATCH] multiple worlds support done --- Assets/IsoTools/Examples/Scenes/Scene10.unity | 2252 ++++++++++++++++- .../Examples/Scripts/Kenney/AlienDestroyer.cs | 2 +- .../Scripts/Internal/Editor/IsoEditorUtils.cs | 302 +++ .../Internal/Editor/IsoObjectEditor.cs | 456 +--- .../Internal/Editor/IsoParentEditor.cs | 165 ++ ...Editor.cs.meta => IsoParentEditor.cs.meta} | 0 .../Editor/IsoSnappingParentEditor.cs | 157 -- .../IsoTools/Scripts/Internal/IsoBehaviour.cs | 16 + Assets/IsoTools/Scripts/IsoParent.cs | 14 + ...appingParent.cs.meta => IsoParent.cs.meta} | 0 Assets/IsoTools/Scripts/IsoSnappingParent.cs | 8 - Assets/IsoTools/Scripts/IsoWorld.cs | 31 +- 12 files changed, 2767 insertions(+), 636 deletions(-) create mode 100644 Assets/IsoTools/Scripts/Internal/Editor/IsoParentEditor.cs rename Assets/IsoTools/Scripts/Internal/Editor/{IsoSnappingParentEditor.cs.meta => IsoParentEditor.cs.meta} (100%) delete mode 100644 Assets/IsoTools/Scripts/Internal/Editor/IsoSnappingParentEditor.cs create mode 100644 Assets/IsoTools/Scripts/IsoParent.cs rename Assets/IsoTools/Scripts/{IsoSnappingParent.cs.meta => IsoParent.cs.meta} (100%) delete mode 100644 Assets/IsoTools/Scripts/IsoSnappingParent.cs diff --git a/Assets/IsoTools/Examples/Scenes/Scene10.unity b/Assets/IsoTools/Examples/Scenes/Scene10.unity index 97dfdb4..a551796 100644 --- a/Assets/IsoTools/Examples/Scenes/Scene10.unity +++ b/Assets/IsoTools/Examples/Scenes/Scene10.unity @@ -91,24 +91,24 @@ NavMeshSettings: cellSize: 0.16666667 accuratePlacement: 0 m_NavMeshData: {fileID: 0} ---- !u!1001 &147835927 +--- !u!1001 &6277738 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 2048596123} + m_TransformParent: {fileID: 522845242} m_Modifications: - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.x - value: 2.2000003 + value: -8.646936 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.y - value: -1.0999999 + value: -3.0285347 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.z - value: 1.3000001 + value: 2.1000001 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalRotation.x @@ -128,20 +128,328 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_RootOrder - value: 3 + value: 5 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.x - value: -0 + value: -2.6706738 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.y - value: -1 + value: 2.3824792 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds value: 0 objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (6) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &6277739 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 6277738} +--- !u!1001 &146765957 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1326297456} + m_Modifications: + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.x + value: -2.2534275 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8703203 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.z + value: 1.8000002 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.x + value: 0.7745 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.y + value: -1.6797 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 113492, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_Name + value: Tile (6) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &146765958 stripped +Transform: + m_PrefabParentObject: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_PrefabInternal: {fileID: 146765957} +--- !u!1001 &162349389 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -10.847053 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -4.7400446 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.0000002 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 14 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -3.6706955 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 2.3825104 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.7644 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (16) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &162349390 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 162349389} +--- !u!1001 &190230988 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: 0.15296054 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -5.2285395 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 1.2 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -1.6706997 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: -0.6174997 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (12) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &190230989 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 190230988} +--- !u!1001 &320252662 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -4.2470484 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -5.2285376 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 1.4000001 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -2.6707008 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 0.38250342 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _showTheirDepends value: 1 @@ -169,28 +477,28 @@ Prefab: m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} m_IsPrefabParent: 0 ---- !u!4 &147835928 stripped +--- !u!4 &320252663 stripped Transform: m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} - m_PrefabInternal: {fileID: 147835927} ---- !u!1001 &488606076 + m_PrefabInternal: {fileID: 320252662} +--- !u!1001 &390781376 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 2048596123} + m_TransformParent: {fileID: 522845242} m_Modifications: - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.x - value: 0.00000047683716 + value: -8.647041 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.y - value: -2.2 + value: -5.228528 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.z - value: 1.2 + value: 1.8000002 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalRotation.x @@ -210,19 +518,19 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_RootOrder - value: 2 + value: 9 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.x - value: -1 + value: -3.6706946 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.y - value: -1 + value: 1.3825063 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.z - value: 0 + value: -0.3822 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _showTheirDepends @@ -246,15 +554,161 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_Name - value: TileA (1) + value: TileA (10) objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} m_IsPrefabParent: 0 ---- !u!4 &488606077 stripped +--- !u!4 &390781377 stripped Transform: m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} - m_PrefabInternal: {fileID: 488606076} + m_PrefabInternal: {fileID: 390781376} +--- !u!1001 &391599603 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -4.246956 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -0.8285414 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.4999998 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -0.6706812 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 2.3824801 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (4) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &391599604 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 391599603} +--- !u!1001 &499772545 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1019705740} + m_Modifications: + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.x + value: 4.776543 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.y + value: -0.6290847 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.z + value: 1.4000001 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.x + value: 2.455 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.y + value: -0.658 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 127850, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_Name + value: BarrelB (1) + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 11472804, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + - {fileID: 11405982, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &499772546 stripped +Transform: + m_PrefabParentObject: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_PrefabInternal: {fileID: 499772545} --- !u!1 &522845241 GameObject: m_ObjectHideFlags: 0 @@ -279,13 +733,27 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 522845241} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -2.1996753, y: 1.1002207, z: 0} + m_LocalPosition: {x: -2.47, y: 2.1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1378790441} - - {fileID: 620192726} - m_Father: {fileID: 2048596123} - m_RootOrder: 0 + - {fileID: 320252663} + - {fileID: 1843667387} + - {fileID: 391599604} + - {fileID: 1359880099} + - {fileID: 6277739} + - {fileID: 1845872796} + - {fileID: 1731235701} + - {fileID: 943344776} + - {fileID: 390781377} + - {fileID: 915115009} + - {fileID: 190230989} + - {fileID: 1754407611} + - {fileID: 553884779} + - {fileID: 162349390} + - {fileID: 1211693887} + m_Father: {fileID: 0} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &522845243 MonoBehaviour: @@ -304,7 +772,7 @@ MonoBehaviour: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 522845241} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3f01619d3802e814f86f9e6bb965349a, type: 3} m_Name: @@ -318,8 +786,9 @@ MonoBehaviour: _showIsoBounds: 0 _showScreenBounds: 0 _showDepends: 1 - _snappingEnabled: 1 ---- !u!1001 &620192725 + _snapByCells: 1 + _snapByObjects: 1 +--- !u!1001 &553884778 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -328,15 +797,15 @@ Prefab: m_Modifications: - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.x - value: 2.1996753 + value: 2.35296 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.y - value: -1.1002207 + value: -4.7400603 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.z - value: 1.5000001 + value: 1.6000001 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalRotation.x @@ -356,19 +825,19 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_RootOrder - value: 1 + value: 13 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.x - value: 0 + value: -0.67070025 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.y - value: 0 + value: -0.6175001 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.z - value: 0 + value: -0.7644 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _showTheirDepends @@ -392,33 +861,33 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_Name - value: TileA (2) + value: TileA (15) objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} m_IsPrefabParent: 0 ---- !u!4 &620192726 stripped +--- !u!4 &553884779 stripped Transform: m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} - m_PrefabInternal: {fileID: 620192725} ---- !u!1001 &821196789 + m_PrefabInternal: {fileID: 553884778} +--- !u!1001 &787597248 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 1019705740} + m_TransformParent: {fileID: 1211693887} m_Modifications: - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.x - value: -0.00021076202 + value: -6.44248 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.y - value: -2.2004635 + value: -7.318998 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.z - value: 1 + value: 1.3000001 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalRotation.x @@ -438,19 +907,19 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_RootOrder - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.x - value: -1 + value: -3.6706 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.y - value: -2 + value: 0.3824 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.z - value: 0 + value: -1 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _showTheirDepends @@ -474,15 +943,404 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_Name - value: TileA (1) + value: TileA (17) objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} m_IsPrefabParent: 0 ---- !u!4 &821196790 stripped +--- !u!4 &787597249 stripped Transform: m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} - m_PrefabInternal: {fileID: 821196789} + m_PrefabInternal: {fileID: 787597248} +--- !u!1 &898563899 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 898563900} + - component: {fileID: 898563901} + m_Layer: 0 + m_Name: IsoParent (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &898563900 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 898563899} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3.0571232, y: 0.5760554, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1733825098} + - {fileID: 1783736477} + - {fileID: 942597885} + m_Father: {fileID: 1019705740} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &898563901 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 898563899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1e3b581728784cafa59b549fe35214b, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &915115008 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: 0.15295339 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -0.8285341 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.5999997 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: 0.3293013 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 1.3825041 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (11) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &915115009 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 915115008} +--- !u!1001 &918003315 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1170467580} + m_Modifications: + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.x + value: -2.2312713 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8623698 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.z + value: 2.3 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.x + value: 0.7745 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.y + value: -0.6797 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 113492, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_Name + value: Tile (6) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &918003316 stripped +Transform: + m_PrefabParentObject: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_PrefabInternal: {fileID: 918003315} +--- !u!1001 &942597884 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 898563900} + m_Modifications: + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalPosition.x + value: 3.398375 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalPosition.y + value: 0.0564515 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalPosition.z + value: 1.2 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: _position.x + value: 2.879 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: _position.y + value: -0.2332 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &942597885 stripped +Transform: + m_PrefabParentObject: {fileID: 452998, guid: a8efaa982fcfd42a495b3649618fac91, type: 2} + m_PrefabInternal: {fileID: 942597884} +--- !u!1001 &943344775 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -4.2470436 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8054854 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.2 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -1.6706941 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 1.3825077 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: 0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (9) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &943344776 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 943344775} +--- !u!1001 &954423650 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1326297456} + m_Modifications: + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.x + value: 1.7063704 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8703203 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.z + value: 2.0000002 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.x + value: 1.7745 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.y + value: -1.6797 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 113492, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_Name + value: Tile (5) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &954423651 stripped +Transform: + m_PrefabParentObject: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_PrefabInternal: {fileID: 954423650} --- !u!1 &1019705739 GameObject: m_ObjectHideFlags: 0 @@ -507,13 +1365,19 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1019705739} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2.2002115, y: -1.0995364, z: 0} + m_LocalPosition: {x: 4.94476, y: -0.52507555, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 821196790} - - {fileID: 2135046319} - m_Father: {fileID: 2048596123} - m_RootOrder: 1 + - {fileID: 1170467580} + - {fileID: 1326297456} + - {fileID: 898563900} + - {fileID: 1306145328} + - {fileID: 1134150589} + - {fileID: 499772546} + - {fileID: 1382345893} + - {fileID: 1382782165} + m_Father: {fileID: 0} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1019705741 MonoBehaviour: @@ -532,39 +1396,248 @@ MonoBehaviour: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1019705739} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3f01619d3802e814f86f9e6bb965349a, type: 3} m_Name: m_EditorClassIdentifier: - _tileSize: 2.2 - _tileRatio: 0.5 - _tileAngle: 45 - _tileHeight: 1.6 + _tileSize: 2.8 + _tileRatio: 0.75 + _tileAngle: 90 + _tileHeight: 0.8 _stepDepth: 0.1 _startDepth: 1 _showIsoBounds: 0 _showScreenBounds: 0 - _showDepends: 1 - _snappingEnabled: 1 ---- !u!1001 &1378790440 + _showDepends: 0 + _snapByCells: 1 + _snapByObjects: 1 +--- !u!1001 &1134150588 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 522845242} + m_TransformParent: {fileID: 1019705740} + m_Modifications: + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.x + value: 0.5395603 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.y + value: -0.30804402 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.x + value: 1.385 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.y + value: -0.5499 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 11472804, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + - {fileID: 11405982, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1134150589 stripped +Transform: + m_PrefabParentObject: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_PrefabInternal: {fileID: 1134150588} +--- !u!1001 &1170191216 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1170467580} + m_Modifications: + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.x + value: 1.7285266 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8623698 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.z + value: 2.1000001 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.x + value: 1.7745 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.y + value: -0.6797 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 113492, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_Name + value: Tile (5) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1170191217 stripped +Transform: + m_PrefabParentObject: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_PrefabInternal: {fileID: 1170191216} +--- !u!1 &1170467579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1170467580} + - component: {fileID: 1170467581} + m_Layer: 0 + m_Name: IsoParent (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1170467580 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1170467579} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.35337496, y: 0.36883938, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1739971309} + - {fileID: 1170191217} + - {fileID: 918003316} + m_Father: {fileID: 1019705740} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1170467581 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1170467579} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1e3b581728784cafa59b549fe35214b, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1211693886 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1211693887} + - component: {fileID: 1211693888} + m_Layer: 0 + m_Name: IsoParent (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1211693887 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211693886} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.004118681, y: 0.0019774437, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1216164787} + - {fileID: 787597249} + - {fileID: 1634802885} + m_Father: {fileID: 522845242} + m_RootOrder: 15 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1211693888 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1211693886} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1e3b581728784cafa59b549fe35214b, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1216164786 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1211693887} m_Modifications: - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.x - value: -0.0003244877 + value: -2.0429206 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.y - value: -2.2002208 + value: -7.318998 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.z - value: 1.4000001 + value: 1.1 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalRotation.x @@ -588,12 +1661,279 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.x - value: -1 + value: -2.6707 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.y + value: -0.6175 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds value: 0 objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (14) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1216164787 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 1216164786} +--- !u!1001 &1306145327 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1019705740} + m_Modifications: + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalPosition.x + value: -1.1136556 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalPosition.y + value: 1.1070887 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalPosition.z + value: 2.2 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: _position.x + value: 0.9675 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: _position.y + value: -0.0734 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 11477330, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + - {fileID: 11468130, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1306145328 stripped +Transform: + m_PrefabParentObject: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + m_PrefabInternal: {fileID: 1306145327} +--- !u!1 &1326297455 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1326297456} + - component: {fileID: 1326297457} + m_Layer: 0 + m_Name: IsoParent (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1326297456 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1326297455} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.3755312, y: -2.5930586, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1797809923} + - {fileID: 954423651} + - {fileID: 146765958} + m_Father: {fileID: 1019705740} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1326297457 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1326297455} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1e3b581728784cafa59b549fe35214b, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1359880098 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -6.4469357 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -1.3170182 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.3 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -1.6706753 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 2.3824773 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (5) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1359880099 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 1359880098} +--- !u!1001 &1378790440 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -6.4470406 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -3.5170023 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 1.9000002 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -2.670692 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 1.3825084 + objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.z value: 0 @@ -629,6 +1969,134 @@ Prefab: Transform: m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} m_PrefabInternal: {fileID: 1378790440} +--- !u!1001 &1382345892 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1019705740} + m_Modifications: + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalPosition.x + value: 2.2945423 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalPosition.y + value: -0.31279594 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalPosition.z + value: 1.5000001 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: _position.x + value: 1.8282 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: _position.y + value: -0.5515 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 127850, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + propertyPath: m_Name + value: BarrelA (1) + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 11477330, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + - {fileID: 11468130, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1382345893 stripped +Transform: + m_PrefabParentObject: {fileID: 439388, guid: dd0c4026a6d694c3dade62fd46e77651, type: 2} + m_PrefabInternal: {fileID: 1382345892} +--- !u!1001 &1382782164 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1019705740} + m_Modifications: + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.x + value: 7.1841006 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.y + value: -0.3721928 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalPosition.z + value: 1.1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.x + value: 3.063 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.y + value: -0.5715 + objectReference: {fileID: 0} + - target: {fileID: 11437010, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 127850, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + propertyPath: m_Name + value: BarrelB (2) + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 11472804, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + - {fileID: 11405982, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1382782165 stripped +Transform: + m_PrefabParentObject: {fileID: 439388, guid: d564723f17e5b453ab3cf2ba1886790d, type: 2} + m_PrefabInternal: {fileID: 1382782164} --- !u!1 &1396455878 GameObject: m_ObjectHideFlags: 0 @@ -689,7 +2157,7 @@ Camera: far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 10 m_Depth: 0 m_CullingMask: serializedVersion: 2 @@ -716,78 +2184,24 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2048596121 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 2048596123} - - component: {fileID: 2048596122} - m_Layer: 0 - m_Name: MainIsoWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2048596122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2048596121} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3f01619d3802e814f86f9e6bb965349a, type: 3} - m_Name: - m_EditorClassIdentifier: - _tileSize: 2.2 - _tileRatio: 0.5 - _tileAngle: 45 - _tileHeight: 1.6 - _stepDepth: 0.1 - _startDepth: 1 - _showIsoBounds: 0 - _showScreenBounds: 0 - _showDepends: 1 - _snappingEnabled: 1 ---- !u!4 &2048596123 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2048596121} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 522845242} - - {fileID: 1019705740} - - {fileID: 488606077} - - {fileID: 147835928} - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &2135046318 +--- !u!1001 &1634802884 Prefab: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 1019705740} + m_TransformParent: {fileID: 1211693887} m_Modifications: - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.x - value: 2.199789 + value: -4.2424803 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.y - value: -1.1004634 + value: -9.030518 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalPosition.z - value: 1.1 + value: 1 objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_LocalRotation.x @@ -807,15 +2221,97 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_RootOrder - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.x - value: -0 + value: -3.6706 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.y - value: -2 + value: -0.6176 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -1.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (18) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1634802885 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 1634802884} +--- !u!1001 &1731235700 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -2.0470397 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -3.517017 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 1.5000001 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -1.6706985 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 0.38250154 objectReference: {fileID: 0} - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: _position.z @@ -843,12 +2339,498 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} propertyPath: m_Name - value: TileA (2) + value: TileA (8) objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} m_IsPrefabParent: 0 ---- !u!4 &2135046319 stripped +--- !u!4 &1731235701 stripped Transform: m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} - m_PrefabInternal: {fileID: 2135046318} + m_PrefabInternal: {fileID: 1731235700} +--- !u!1001 &1733825097 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 898563900} + m_Modifications: + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalPosition.x + value: -2.045555 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalPosition.y + value: 0.25335252 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalPosition.z + value: 1.9000002 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: _position.x + value: 1.5042 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: _position.y + value: -0.1669 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1733825098 stripped +Transform: + m_PrefabParentObject: {fileID: 452998, guid: ea8ddc148e2f840a193a04b875d3b436, type: 2} + m_PrefabInternal: {fileID: 1733825097} +--- !u!1001 &1739971308 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1170467580} + m_Modifications: + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.x + value: 5.688324 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8623698 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.z + value: 1.6000001 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.x + value: 2.7745 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.y + value: -0.6797 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 113492, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_Name + value: Tile (4) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1739971309 stripped +Transform: + m_PrefabParentObject: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_PrefabInternal: {fileID: 1739971308} +--- !u!1001 &1754407610 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -8.647041 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -0.82851446 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.6999996 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -1.6706884 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 3.382512 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (13) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1754407611 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 1754407610} +--- !u!1001 &1783736476 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 898563900} + m_Modifications: + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalPosition.x + value: 1.1222825 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalPosition.y + value: 0.25335252 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalPosition.z + value: 1.7000002 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: _position.x + value: 2.3042 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: _position.y + value: -0.1669 + objectReference: {fileID: 0} + - target: {fileID: 11481038, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + propertyPath: _position.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1783736477 stripped +Transform: + m_PrefabParentObject: {fileID: 452998, guid: c0f50e2db7b084147b02788fcd9b9e0d, type: 2} + m_PrefabInternal: {fileID: 1783736476} +--- !u!1001 &1797809922 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1326297456} + m_Modifications: + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.x + value: 5.6661677 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.y + value: -1.8703203 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalPosition.z + value: 1.3000001 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.x + value: 2.7745 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.y + value: -1.6797 + objectReference: {fileID: 0} + - target: {fileID: 11482466, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 113492, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + propertyPath: m_Name + value: Tile (4) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1797809923 stripped +Transform: + m_PrefabParentObject: {fileID: 467434, guid: 724acce3e28b04f4ab4302d47fe5429d, type: 2} + m_PrefabInternal: {fileID: 1797809922} +--- !u!1001 &1843667386 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: -2.0469325 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -1.3170314 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 2.3999999 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -0.67068064 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 1.3824704 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (3) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1843667387 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 1843667386} +--- !u!1001 &1845872795 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 522845242} + m_Modifications: + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.x + value: 0.15295911 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.y + value: -3.0285401 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalPosition.z + value: 1.7000002 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.x + value: -0.67070025 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.y + value: 0.3825002 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _position.z + value: -0.3822 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showTheirDepends + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showIsoBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showScreenBounds + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: _showSelfDepends + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11472392, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 180122, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + propertyPath: m_Name + value: TileA (7) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1845872796 stripped +Transform: + m_PrefabParentObject: {fileID: 417424, guid: 185575a05f87743c0b2ddb83dd39c6cd, type: 2} + m_PrefabInternal: {fileID: 1845872795} diff --git a/Assets/IsoTools/Examples/Scripts/Kenney/AlienDestroyer.cs b/Assets/IsoTools/Examples/Scripts/Kenney/AlienDestroyer.cs index faecc4a..c04fc1a 100644 --- a/Assets/IsoTools/Examples/Scripts/Kenney/AlienDestroyer.cs +++ b/Assets/IsoTools/Examples/Scripts/Kenney/AlienDestroyer.cs @@ -7,7 +7,7 @@ namespace IsoTools.Examples.Kenney { static IsoRaycastHit[] _raycastBuffer = new IsoRaycastHit[16]; void Update () { - var iso_world = IsoWorld.Instance; + var iso_world = IsoWorld.GetWorld(0); if ( iso_world && Input.GetMouseButtonDown(0) ) { var iso_mouse_pos = iso_world.MouseIsoPosition(); var ray_from_iso_camera = iso_world.RayFromIsoCameraToIsoPoint(iso_mouse_pos); diff --git a/Assets/IsoTools/Scripts/Internal/Editor/IsoEditorUtils.cs b/Assets/IsoTools/Scripts/Internal/Editor/IsoEditorUtils.cs index f724b4b..872cdbe 100644 --- a/Assets/IsoTools/Scripts/Internal/Editor/IsoEditorUtils.cs +++ b/Assets/IsoTools/Scripts/Internal/Editor/IsoEditorUtils.cs @@ -1,8 +1,17 @@ using UnityEngine; using UnityEditor; +using System.Linq; +using System.Collections.Generic; namespace IsoTools.Internal { static class IsoEditorUtils { + + // --------------------------------------------------------------------- + // + // Inspector + // + // --------------------------------------------------------------------- + public static void DoWithMixedValue(bool mixed, System.Action act) { var last_show_mixed_value = EditorGUI.showMixedValue; EditorGUI.showMixedValue = mixed; @@ -21,5 +30,298 @@ namespace IsoTools.Internal { EditorGUI.EndDisabledGroup(); } } + + public static void DrawWorldProperties(IsoWorld[] iso_worlds) { + if ( iso_worlds.Length > 0 ) { + var so = new SerializedObject(iso_worlds); + var so_prop = so.GetIterator(); + if ( so_prop.NextVisible(true) ) { + while ( so_prop.NextVisible(true) ) { + EditorGUILayout.PropertyField(so_prop); + } + } + if ( GUI.changed ) { + so.ApplyModifiedProperties(); + } + } + } + + public static void DrawSelfWorldProperty(IsoWorld[] iso_worlds, string type_name) { + if ( iso_worlds.Length > 0 ) { + var mixed_world = iso_worlds.GroupBy(p => p).Count() > 1; + EditorGUILayout.Space(); + IsoEditorUtils.DoWithEnabledGUI(false, () => { + IsoEditorUtils.DoWithMixedValue(mixed_world, () => { + EditorGUILayout.ObjectField( + "Current IsoWorld", + iso_worlds.First(), + typeof(IsoWorld), + true); + }); + }); + } else { + EditorGUILayout.HelpBox( + string.Format( + "Detached {0}\nNeed to be a child of IsoWorld", + type_name), + MessageType.Warning, + true); + } + } + + // --------------------------------------------------------------------- + // + // Editor + // + // --------------------------------------------------------------------- + + public static float ZMoveIsoObjects( + bool move, + IsoWorld iso_world, + Dictionary> all_iso_objects, + Dictionary> all_other_objects, + float delta) + { + List iso_objects; + if ( all_iso_objects.TryGetValue(iso_world, out iso_objects) ) { + if ( move ) { + Undo.RecordObjects( + iso_objects.ToArray(), + iso_objects.Count > 1 ? "Move IsoObjects" : "Move IsoObject"); + } + List other_objects; + if ( all_other_objects.TryGetValue(iso_world, out other_objects) && other_objects.Count > 0 ) { + var snapping_z = false; + if ( IsSnapByObjectsEnabled(iso_world) ) { + foreach ( var iso_object in iso_objects ) { + var iso_orig_z = iso_object.positionZ; + var result_p_z = iso_orig_z + delta; + foreach ( var other in other_objects ) { + if ( IsoEditorUtils.IsSnapOverlaps(iso_object.positionX, iso_object.sizeX, other.positionX, other.sizeX) && + IsoEditorUtils.IsSnapOverlaps(iso_object.positionY, iso_object.sizeY, other.positionY, other.sizeY) ) + { + var new_snapping_z = !snapping_z && IsoEditorUtils.IsSnapOverlaps(result_p_z, iso_object.sizeZ, other.positionZ, other.sizeZ) + ? IsoEditorUtils.SnapProcess(ref result_p_z, iso_object.sizeZ, other.positionZ, other.sizeZ) + : false; + if ( new_snapping_z ) { + delta = result_p_z - iso_orig_z; + snapping_z = true; + break; + } + } + } + if ( snapping_z ) { + break; + } + } + } + if ( IsSnapByCellsEnabled(iso_world) && !snapping_z ) { + foreach ( var iso_object in iso_objects ) { + var iso_orig_z = iso_object.positionZ; + var result_p_z = iso_orig_z + delta; + var new_snapping_z = IsoEditorUtils.SnapProcess(ref result_p_z, iso_object.sizeZ, iso_object.tilePositionZ, 1.0f); + if ( new_snapping_z ) { + delta = result_p_z - iso_orig_z; + snapping_z = true; + break; + } + } + } + } + return iso_objects.Aggregate(0.0f, (AccIn, iso_object) => { + var iso_orig_z = iso_object.positionZ; + var result_p_z = iso_orig_z + delta; + if ( move ) { + iso_object.positionZ = IsoUtils.FloatBeautifier(result_p_z); + } + var z_delta = result_p_z - iso_orig_z; + return Mathf.Abs(z_delta) > Mathf.Abs(AccIn) ? z_delta : AccIn; + }); + } + return delta; + } + + public static Vector3 XYMoveIsoObjects( + bool move, + IsoWorld iso_world, + Dictionary> all_iso_objects, + Dictionary> all_other_objects, + Vector3 iso_delta) + { + List iso_objects; + if ( all_iso_objects.TryGetValue(iso_world, out iso_objects) ) { + if ( move ) { + Undo.RecordObjects( + iso_objects.ToArray(), + iso_objects.Count > 1 ? "Move IsoObjects" : "Move IsoObject"); + } + List other_objects; + if ( all_other_objects.TryGetValue(iso_world, out other_objects) && other_objects.Count > 0 ) { + var snapping_x = false; + var snapping_y = false; + if ( IsSnapByObjectsEnabled(iso_world) ) { + foreach ( var iso_object in iso_objects ) { + var iso_orig_p = iso_object.position; + var result_pos_iso = iso_orig_p + iso_delta; + foreach ( var other in other_objects ) { + if ( IsoEditorUtils.IsSnapOverlaps(iso_object.positionZ, iso_object.sizeZ, other.positionZ, other.sizeZ) ) { + var new_snapping_x = !snapping_x && IsoEditorUtils.IsSnapOverlaps(result_pos_iso.y, iso_object.sizeY, other.positionY, other.sizeY) + ? IsoEditorUtils.SnapProcess(ref result_pos_iso.x, iso_object.sizeX, other.positionX, other.sizeX) + : false; + var new_snapping_y = !snapping_y && IsoEditorUtils.IsSnapOverlaps(result_pos_iso.x, iso_object.sizeX, other.positionX, other.sizeX) + ? IsoEditorUtils.SnapProcess(ref result_pos_iso.y, iso_object.sizeY, other.positionY, other.sizeY) + : false; + if ( new_snapping_x || new_snapping_y ) { + if ( new_snapping_x ) { + snapping_x = true; + iso_delta.x = result_pos_iso.x - iso_orig_p.x; + iso_delta.y = result_pos_iso.y - iso_orig_p.y; + } + if ( new_snapping_y ) { + snapping_y = true; + iso_delta.x = result_pos_iso.x - iso_orig_p.x; + iso_delta.y = result_pos_iso.y - iso_orig_p.y; + } + if ( snapping_x && snapping_y ) { + break; + } + } + } + } + if ( snapping_x && snapping_y ) { + break; + } + } + } + if ( IsSnapByCellsEnabled(iso_world) && !snapping_x && !snapping_y ) { + foreach ( var iso_object in iso_objects ) { + var iso_orig_p = iso_object.position; + var result_pos_iso = iso_orig_p + iso_delta; + var new_snapping_x = IsoEditorUtils.SnapProcess(ref result_pos_iso.x, iso_object.sizeX, iso_object.tilePositionX, 1.0f); + var new_snapping_y = IsoEditorUtils.SnapProcess(ref result_pos_iso.y, iso_object.sizeY, iso_object.tilePositionY, 1.0f); + if ( new_snapping_x || new_snapping_y ) { + if ( new_snapping_x ) { + iso_delta.x = result_pos_iso.x - iso_orig_p.x; + iso_delta.y = result_pos_iso.y - iso_orig_p.y; + snapping_x = true; + } + if ( new_snapping_y ) { + iso_delta.x = result_pos_iso.x - iso_orig_p.x; + iso_delta.y = result_pos_iso.y - iso_orig_p.y; + snapping_y = true; + } + if ( snapping_x && snapping_y ) { + break; + } + } + } + } + } + return iso_objects.Aggregate(Vector3.zero, (AccIn, iso_object) => { + var iso_orig_p = iso_object.position; + var result_pos_iso = iso_orig_p + iso_delta; + if ( move ) { + iso_object.position = IsoUtils.VectorBeautifier(result_pos_iso); + } + var pos_delta = result_pos_iso - iso_orig_p; + return pos_delta.magnitude > AccIn.magnitude ? pos_delta : AccIn; + }); + } + return iso_delta; + } + + // --------------------------------------------------------------------- + // + // Gizmos + // + // --------------------------------------------------------------------- + + public static Vector3 GizmoRectangle(Vector3 center) { + Handles.color = new Color( + Handles.zAxisColor.r, + Handles.zAxisColor.g, + Handles.zAxisColor.b, + 0.3f); + Handles.DotCap( + 0, + center, + Quaternion.identity, + HandleUtility.GetHandleSize(center) * 0.15f); + Handles.color = Handles.zAxisColor; + Handles.ArrowCap( + 0, + center, + Quaternion.identity, + HandleUtility.GetHandleSize(center)); + Handles.color = Handles.zAxisColor; + return Handles.FreeMoveHandle( + center, + Quaternion.identity, + HandleUtility.GetHandleSize(center) * 0.15f, + Vector3.zero, + Handles.RectangleCap); + } + + public static Vector3 GizmoSlider(Color color, Vector3 pos, Vector3 dir) { + Handles.color = color; + return Handles.Slider(pos, dir); + } + + // --------------------------------------------------------------------- + // + // Snapping + // + // --------------------------------------------------------------------- + + const float SnapDistance = 0.2f; + + public static bool SnapProcess(ref float min_a, float size_a, float min_b, float size_b) { + var max_a = min_a + size_a; + var max_b = min_b + size_b; + var result = false; + if ( IsSnapOverlaps(min_a, size_a, min_b, size_b) ) { + // |min_a max_a|min_b max_b| + if ( Mathf.Abs(max_a - min_b) < SnapDistance ) { + min_a = min_b - size_a; + result = true; + } + // |min_b max_b|min_a max_a| + if ( Mathf.Abs(max_b - min_a) < SnapDistance ) { + min_a = max_b; + result = true; + } + // |min_a_____max_a| + // |min_b__max_b| + if ( Mathf.Abs(min_a - min_b) < SnapDistance ) { + min_a = min_b; + result = true; + } + // |min_a_____max_a| + // |min_b__max_b| + if ( Mathf.Abs(max_a - max_b) < SnapDistance ) { + min_a = max_b - size_a; + result = true; + } + } + return result; + } + + public static bool IsSnapOverlaps(float min_a, float size_a, float min_b, float size_b) { + return + min_a + size_a + SnapDistance >= min_b && + min_a - SnapDistance <= min_b + size_b; + } + + public static bool IsSnapByCellsEnabled(IsoWorld iso_world) { + return + iso_world && + (iso_world.isSnapByCells != Event.current.control); + } + + public static bool IsSnapByObjectsEnabled(IsoWorld iso_world) { + return + iso_world && + (iso_world.isSnapByObjects != Event.current.control); + } } } \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/Internal/Editor/IsoObjectEditor.cs b/Assets/IsoTools/Scripts/Internal/Editor/IsoObjectEditor.cs index 084020f..70f593e 100644 --- a/Assets/IsoTools/Scripts/Internal/Editor/IsoObjectEditor.cs +++ b/Assets/IsoTools/Scripts/Internal/Editor/IsoObjectEditor.cs @@ -7,42 +7,138 @@ namespace IsoTools.Internal { [CustomEditor(typeof(IsoObject)), CanEditMultipleObjects] class IsoObjectEditor : Editor { - IDictionary _positions = new Dictionary(); - IDictionary _isoZPositions = new Dictionary(); - IList _otherObjects = new List(); - Vector3 _center = Vector3.zero; - Vector3 _viewCenter = Vector3.zero; + Dictionary> _isoObjects = new Dictionary>(); + Dictionary> _otherObjects = new Dictionary>(); + Dictionary _viewCenters = new Dictionary(); - public static readonly float SnappingDistance = 0.2f; + // --------------------------------------------------------------------- + // + // + // + // --------------------------------------------------------------------- - static bool IsSnappingEnabled() { - var iso_world = IsoWorld.Instance; - return iso_world && (iso_world.isSnappingEnabled != Event.current.control); - } - - void GrabPositions() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - _positions = targets - .OfType() - .ToDictionary(p => p, p => p.transform.position); - _isoZPositions = targets - .OfType() - .ToDictionary(p => p, p => p.position.z); - _center = _viewCenter = _positions.Aggregate(Vector3.zero, (AccIn, p) => { - return AccIn + IsoUtils.Vec3FromVec2(iso_world.IsoToScreen(p.Key.position + p.Key.size * 0.5f)); - }) / _positions.Count; - } else { - _positions.Clear(); - _isoZPositions.Clear(); - } + void PrepareTargets() { + _isoObjects = targets + .OfType() + .Where(p => p.isoWorld) + .GroupBy(p => p.isoWorld) + .ToDictionary(p => p.Key, p => p.ToList()); + _viewCenters = _isoObjects.ToDictionary( + pair => pair.Key, + pair => { + var iso_world = pair.Key; + return pair.Value.Aggregate(Vector3.zero, (AccIn, p) => { + return AccIn + IsoUtils.Vec3FromVec2( + iso_world.IsoToScreen(p.position + p.size * 0.5f)); + }) / pair.Value.Count; + }); _otherObjects = FindObjectsOfType() - .Where(p => p.gameObject.activeInHierarchy && !_positions.ContainsKey(p)) - .ToList(); + .Where(p => p.IsActive() && p.isoWorld) + .Where(p => _isoObjects.ContainsKey(p.isoWorld)) + .Where(p => !_isoObjects[p.isoWorld].Contains(p)) + .GroupBy(p => p.isoWorld) + .ToDictionary(p => p.Key, p => p.ToList()); } + void DrawCustomInspector() { + var iso_worlds = _isoObjects.Keys.ToArray(); + IsoEditorUtils.DrawWorldProperties(iso_worlds); + IsoEditorUtils.DrawSelfWorldProperty(iso_worlds, "IsoObject"); + } + + // --------------------------------------------------------------------- + // + // + // + // --------------------------------------------------------------------- + + void DisableCustomTools() { + if ( Tools.hidden ) { + Tools.hidden = false; + Tools.current = Tool.Move; + } + } + + void DrawCustomTools() { + if ( Tools.current == Tool.Move ) { + Tools.hidden = true; + ZMoveSliderTool(); + XYMoveSliderTool(Handles.xAxisColor, IsoUtils.vec3OneX); + XYMoveSliderTool(Handles.yAxisColor, IsoUtils.vec3OneY); + XYMoveRectangleTool(); + } else { + Tools.hidden = false; + } + } + + void ZMoveSliderTool() { + foreach ( var iso_world in _viewCenters.Keys.ToList() ) { + EditorGUI.BeginChangeCheck(); + var old_center = _viewCenters[iso_world]; + var new_center = IsoEditorUtils.GizmoSlider( + Handles.zAxisColor, + old_center, + IsoUtils.vec3OneY); + if ( EditorGUI.EndChangeCheck() ) { + var old_delta = new_center - old_center; + var new_delta = IsoEditorUtils.ZMoveIsoObjects( + true, + iso_world, + _isoObjects, + _otherObjects, + old_delta.y / iso_world.tileHeight) * iso_world.tileHeight; + _viewCenters[iso_world] = old_center + IsoUtils.Vec3FromY(new_delta); + } + } + } + + void XYMoveSliderTool(Color color, Vector3 dir) { + foreach ( var iso_world in _viewCenters.Keys.ToList() ) { + EditorGUI.BeginChangeCheck(); + var old_center = _viewCenters[iso_world]; + var new_center = IsoEditorUtils.GizmoSlider( + color, + old_center, + iso_world.IsoToScreen(dir)); + if ( EditorGUI.EndChangeCheck() ) { + var old_delta = new_center - old_center; + var new_delta = iso_world.IsoToScreen(IsoEditorUtils.XYMoveIsoObjects( + true, + iso_world, + _isoObjects, + _otherObjects, + iso_world.ScreenToIso(old_delta))); + _viewCenters[iso_world] = old_center + IsoUtils.Vec3FromVec2(new_delta); + } + } + } + + void XYMoveRectangleTool() { + foreach ( var iso_world in _viewCenters.Keys.ToList() ) { + EditorGUI.BeginChangeCheck(); + var old_center = _viewCenters[iso_world]; + var new_center = IsoEditorUtils.GizmoRectangle(old_center); + if ( EditorGUI.EndChangeCheck() ) { + var old_delta = new_center - old_center; + var new_delta = iso_world.IsoToScreen(IsoEditorUtils.XYMoveIsoObjects( + true, + iso_world, + _isoObjects, + _otherObjects, + iso_world.ScreenToIso(old_delta))); + _viewCenters[iso_world] = old_center + IsoUtils.Vec3FromVec2(new_delta); + } + } + } + + // --------------------------------------------------------------------- + // + // + // + // --------------------------------------------------------------------- + void DirtyTargetPosition() { - if ( targets.Length == 1 && (target is IsoObject) && (target as IsoObject).gameObject.activeInHierarchy ) { + if ( targets.Length == 1 && (target is IsoObject) && (target as IsoObject).IsActive() ) { var position_prop = serializedObject.FindProperty("_position"); if ( position_prop != null ) { var last_value = position_prop.vector3Value; @@ -56,311 +152,29 @@ namespace IsoTools.Internal { } } - void DrawWorldEditorProperties() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - var so = new SerializedObject(iso_world); - EditorGUILayout.PropertyField(so.FindProperty("_showIsoBounds")); - EditorGUILayout.PropertyField(so.FindProperty("_showScreenBounds")); - EditorGUILayout.PropertyField(so.FindProperty("_showDepends")); - EditorGUILayout.PropertyField(so.FindProperty("_snappingEnabled")); - if ( GUI.changed ) { - so.ApplyModifiedProperties(); - } - } - } - - void DrawSelfInfoProperties() { - var iso_objects = targets.OfType(); - if ( iso_objects.Count() > 0 ) { - var mixed_world = iso_objects.GroupBy(p => p.isoWorld).Count() > 1; - IsoEditorUtils.DoWithEnabledGUI(false, () => { - IsoEditorUtils.DoWithMixedValue(mixed_world, () => { - EditorGUILayout.ObjectField("Current Object World", iso_objects.First().isoWorld, typeof(IsoWorld), true); - }); - }); - } - } - - static bool SnappingProcess(ref float min_a, float size_a, float min_b, float size_b) { - var max_a = min_a + size_a; - var max_b = min_b + size_b; - var result = false; - if ( IsSnappingIntersect(min_a, size_a, min_b, size_b) ) { - // |min_a max_a|min_b max_b| - if ( Mathf.Abs(max_a - min_b) < SnappingDistance ) { - min_a = min_b - size_a; - result = true; - } - // |min_b max_b|min_a max_a| - if ( Mathf.Abs(max_b - min_a) < SnappingDistance ) { - min_a = max_b; - result = true; - } - // |min_a_____max_a| - // |min_b__max_b| - if ( Mathf.Abs(min_a - min_b) < SnappingDistance ) { - min_a = min_b; - result = true; - } - // |min_a_____max_a| - // |min_b__max_b| - if ( Mathf.Abs(max_a - max_b) < SnappingDistance ) { - min_a = max_b - size_a; - result = true; - } - } - return result; - } - - static bool IsSnappingIntersect(float min_a, float size_a, float min_b, float size_b) { - return - min_a + size_a + SnappingDistance >= min_b && - min_a - SnappingDistance <= min_b + size_b; - } - - public static float ZMoveIsoObjects( - bool move, - float delta, - IDictionary iso_z_positions, - IList other_objects) - { - if ( move ) { - Undo.RecordObjects( - iso_z_positions.Keys.ToArray(), - iso_z_positions.Count > 1 ? "Move IsoObjects" : "Move IsoObject"); - } - if ( IsSnappingEnabled() ) { - var snapping_z = false; - foreach ( var pair in iso_z_positions ) { - var iso_object = pair.Key; - var iso_orig_z = pair.Value; - var result_p_z = iso_orig_z + delta; - foreach ( var other in other_objects ) { - if ( IsSnappingIntersect(iso_object.positionX, iso_object.sizeX, other.positionX, other.sizeX) && - IsSnappingIntersect(iso_object.positionY, iso_object.sizeY, other.positionY, other.sizeY) ) - { - var new_snapping_z = !snapping_z && IsSnappingIntersect(result_p_z, iso_object.sizeZ, other.positionZ, other.sizeZ) - ? SnappingProcess(ref result_p_z, iso_object.sizeZ, other.positionZ, other.sizeZ) - : false; - if ( new_snapping_z ) { - delta = result_p_z - iso_orig_z; - snapping_z = true; - } - } - } - if ( snapping_z ) { - break; - } - } - if ( !snapping_z ) { - var pair = iso_z_positions.First(); - var iso_object = pair.Key; - var iso_orig_z = pair.Value; - var result_p_z = iso_orig_z + delta; - var new_snapping_z = SnappingProcess(ref result_p_z, iso_object.sizeZ, iso_object.tilePositionZ, 1.0f); - if ( new_snapping_z ) { - delta = result_p_z - iso_orig_z; - snapping_z = true; - } - } - } - return iso_z_positions.Aggregate(0.0f, (AccIn, pair) => { - var iso_object = pair.Key; - var iso_orig_z = pair.Value; - var result_p_z = iso_orig_z + delta; - if ( move ) { - iso_object.positionZ = IsoUtils.FloatBeautifier(result_p_z); - } - var z_delta = result_p_z - iso_orig_z; - return Mathf.Abs(z_delta) > Mathf.Abs(AccIn) ? z_delta : AccIn; - }); - } - - public static Vector3 XYMoveIsoObjects( - bool move, - Vector3 delta, - IDictionary positions, - IList other_objects) - { - if ( move ) { - Undo.RecordObjects( - positions.Keys.ToArray(), - positions.Count > 1 ? "Move IsoObjects" : "Move IsoObject"); - } - if ( IsSnappingEnabled() ) { - var snapping_x = false; - var snapping_y = false; - foreach ( var pair in positions ) { - var iso_object = pair.Key; - var iso_orig_p = pair.Value; - var result_pos = iso_orig_p + delta; - var result_pos_iso = IsoWorld.Instance.ScreenToIso(result_pos, iso_object.positionZ); - foreach ( var other in other_objects ) { - if ( IsSnappingIntersect(iso_object.positionZ, iso_object.sizeZ, other.positionZ, other.sizeZ) ) { - var new_snapping_x = !snapping_x && IsSnappingIntersect(result_pos_iso.y, iso_object.sizeY, other.positionY, other.sizeY) - ? SnappingProcess(ref result_pos_iso.x, iso_object.sizeX, other.positionX, other.sizeX) - : false; - var new_snapping_y = !snapping_y && IsSnappingIntersect(result_pos_iso.x, iso_object.sizeX, other.positionX, other.sizeX) - ? SnappingProcess(ref result_pos_iso.y, iso_object.sizeY, other.positionY, other.sizeY) - : false; - if ( new_snapping_x || new_snapping_y ) { - result_pos = IsoWorld.Instance.IsoToScreen(result_pos_iso); - if ( new_snapping_x ) { - delta.x = result_pos.x - iso_orig_p.x; - delta.y = result_pos.y - iso_orig_p.y; - snapping_x = true; - } - if ( new_snapping_y ) { - delta.x = result_pos.x - iso_orig_p.x; - delta.y = result_pos.y - iso_orig_p.y; - snapping_y = true; - } - } - } - } - if ( snapping_x && snapping_y ) { - break; - } - } - if ( !snapping_x && !snapping_y ) { - var pair = positions.First(); - var iso_object = pair.Key; - var iso_orig_p = pair.Value; - var result_pos = iso_orig_p + delta; - var result_pos_iso = IsoWorld.Instance.ScreenToIso(result_pos, iso_object.positionZ); - var new_snapping_x = SnappingProcess(ref result_pos_iso.x, iso_object.sizeX, iso_object.tilePositionX, 1.0f); - var new_snapping_y = SnappingProcess(ref result_pos_iso.y, iso_object.sizeY, iso_object.tilePositionY, 1.0f); - if ( new_snapping_x || new_snapping_y ) { - result_pos = IsoWorld.Instance.IsoToScreen(result_pos_iso); - if ( new_snapping_x ) { - delta.x = result_pos.x - iso_orig_p.x; - delta.y = result_pos.y - iso_orig_p.y; - snapping_x = true; - } - if ( new_snapping_y ) { - delta.x = result_pos.x - iso_orig_p.x; - delta.y = result_pos.y - iso_orig_p.y; - snapping_y = true; - } - } - } - } - return positions.Aggregate(Vector3.zero, (AccIn, pair) => { - var iso_object = pair.Key; - var iso_orig_p = pair.Value; - var result_pos = iso_orig_p + delta; - if ( move ) { - var new_iso_pos = IsoWorld.Instance.ScreenToIso( - result_pos, - iso_object.positionZ); - iso_object.position = IsoUtils.VectorBeautifier(new_iso_pos); - } - var pos_delta = result_pos - iso_orig_p; - return pos_delta.magnitude > AccIn.magnitude ? pos_delta : AccIn; - }); - } - - void ZMoveSlider() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - Handles.color = Handles.zAxisColor; - var delta = Handles.Slider(_viewCenter, IsoUtils.vec3OneY) - _viewCenter; - if ( Mathf.Abs(delta.y) > Mathf.Epsilon ) { - float tmp_y = ZMoveIsoObjects( - true, - (_viewCenter.y - _center.y + delta.y) / iso_world.tileHeight, - _isoZPositions, - _otherObjects); - _viewCenter = _center + IsoUtils.Vec3FromY(tmp_y * iso_world.tileHeight); - } - } - } - - void XYMoveSlider(Color color, Vector3 dir) { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - Handles.color = color; - var delta = Handles.Slider(_viewCenter, iso_world.IsoToScreen(dir)) - _viewCenter; - if ( delta.magnitude > Mathf.Epsilon ) { - _viewCenter = _center + XYMoveIsoObjects( - true, - _viewCenter - _center + delta, - _positions, - _otherObjects); - } - } - } - - void XYMoveRectangle() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - Handles.color = new Color( - Handles.zAxisColor.r, - Handles.zAxisColor.g, - Handles.zAxisColor.b, - 0.3f); - Handles.DotCap( - 0, - _viewCenter, - Quaternion.identity, - HandleUtility.GetHandleSize(_viewCenter) * 0.15f); - Handles.color = Handles.zAxisColor; - Handles.ArrowCap( - 0, - _viewCenter, - Quaternion.identity, - HandleUtility.GetHandleSize(_viewCenter)); - Handles.color = Handles.zAxisColor; - var delta = Handles.FreeMoveHandle( - _viewCenter, - Quaternion.identity, - HandleUtility.GetHandleSize(_viewCenter) * 0.15f, - Vector3.zero, - Handles.RectangleCap) - _viewCenter; - if ( delta.magnitude > Mathf.Epsilon ) { - _viewCenter = _center + XYMoveIsoObjects( - true, - _viewCenter - _center + delta, - _positions, - _otherObjects); - } - } - } - - // + // --------------------------------------------------------------------- // + // Messages // + // --------------------------------------------------------------------- void OnEnable() { - GrabPositions(); + PrepareTargets(); } void OnDisable() { - if ( Tools.hidden ) { - Tools.hidden = false; - Tools.current = Tool.Move; - } + DisableCustomTools(); } void OnSceneGUI() { - if ( Tools.current == Tool.Move ) { - Tools.hidden = true; - ZMoveSlider(); - XYMoveSlider(Handles.xAxisColor, IsoUtils.vec3OneX); - XYMoveSlider(Handles.yAxisColor, IsoUtils.vec3OneY); - XYMoveRectangle(); - } else { - Tools.hidden = false; - } + DrawCustomTools(); } public override void OnInspectorGUI() { - DrawDefaultInspector(); - GrabPositions(); + PrepareTargets(); DirtyTargetPosition(); - DrawWorldEditorProperties(); - DrawSelfInfoProperties(); + DrawDefaultInspector(); + DrawCustomInspector(); } } } \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/Internal/Editor/IsoParentEditor.cs b/Assets/IsoTools/Scripts/Internal/Editor/IsoParentEditor.cs new file mode 100644 index 0000000..3dfa798 --- /dev/null +++ b/Assets/IsoTools/Scripts/Internal/Editor/IsoParentEditor.cs @@ -0,0 +1,165 @@ +using UnityEngine; +using UnityEditor; +using System.Linq; +using System.Collections.Generic; + +namespace IsoTools.Internal { + [CustomEditor(typeof(IsoParent)), CanEditMultipleObjects] + public class IsoParentEditor : Editor { + + Dictionary> _isoParents = new Dictionary>(); + Dictionary> _isoObjects = new Dictionary>(); + Dictionary> _otherObjects = new Dictionary>(); + Dictionary _viewCenters = new Dictionary(); + + // --------------------------------------------------------------------- + // + // + // + // --------------------------------------------------------------------- + + void PrepareTargets() { + _isoParents = targets + .OfType() + .Where(p => p.isoWorld) + .GroupBy(p => p.isoWorld) + .ToDictionary(p => p.Key, p => p.ToList()); + _isoObjects = _isoParents.ToDictionary( + p => p.Key, + p => p.Value.SelectMany(t => t.GetComponentsInChildren(true)).ToList()); + _otherObjects = FindObjectsOfType() + .Where(p => p.IsActive() && p.isoWorld) + .Where(p => _isoObjects.ContainsKey(p.isoWorld)) + .Where(p => !_isoObjects[p.isoWorld].Contains(p)) + .GroupBy(p => p.isoWorld) + .ToDictionary(p => p.Key, p => p.ToList()); + _viewCenters = _isoParents.ToDictionary( + pair => pair.Key, + pair => { + var iso_world = pair.Key; + return pair.Value.Aggregate(Vector3.zero, (AccIn, p) => { + return AccIn + p.transform.position; + }) / pair.Value.Count; + }); + } + + void DrawCustomInspector() { + var iso_worlds = _isoParents.Keys.ToArray(); + IsoEditorUtils.DrawWorldProperties(iso_worlds); + IsoEditorUtils.DrawSelfWorldProperty(iso_worlds, "IsoParent"); + } + + // --------------------------------------------------------------------- + // + // + // + // --------------------------------------------------------------------- + + void XYMoveSliderTool(Color color, Vector3 dir) { + foreach ( var iso_world in _viewCenters.Keys.ToList() ) { + EditorGUI.BeginChangeCheck(); + var old_center = _viewCenters[iso_world]; + var new_center = IsoEditorUtils.GizmoSlider( + color, + old_center, + iso_world.IsoToScreen(dir)); + if ( EditorGUI.EndChangeCheck() ) { + Undo.RecordObjects( + _isoParents[iso_world].Select(p => p.transform).ToArray(), + _isoParents[iso_world].Count > 1 ? "Move IsoParents" : "Move IsoParent"); + var old_delta = new_center - old_center; + var new_delta = iso_world.IsoToScreen(IsoEditorUtils.XYMoveIsoObjects( + false, + iso_world, + _isoObjects, + _otherObjects, + iso_world.ScreenToIso(old_delta))); + _viewCenters[iso_world] = old_center + IsoUtils.Vec3FromVec2(new_delta); + foreach ( var parent in _isoParents[iso_world] ) { + parent.transform.position += IsoUtils.Vec3FromVec2(new_delta); + } + foreach ( var iso_object in _isoObjects[iso_world] ) { + iso_object.FixIsoPosition(); + iso_object.positionXY = IsoUtils.VectorBeautifier(iso_object.positionXY); + } + } + } + } + + void XYMoveRectangleTool() { + foreach ( var iso_world in _viewCenters.Keys.ToList() ) { + EditorGUI.BeginChangeCheck(); + var old_center = _viewCenters[iso_world]; + var new_center = IsoEditorUtils.GizmoRectangle(old_center); + if ( EditorGUI.EndChangeCheck() ) { + Undo.RecordObjects( + _isoParents[iso_world].Select(p => p.transform).ToArray(), + _isoParents[iso_world].Count > 1 ? "Move IsoParents" : "Move IsoParent"); + var old_delta = new_center - old_center; + var new_delta = iso_world.IsoToScreen(IsoEditorUtils.XYMoveIsoObjects( + false, + iso_world, + _isoObjects, + _otherObjects, + iso_world.ScreenToIso(old_delta))); + _viewCenters[iso_world] = old_center + IsoUtils.Vec3FromVec2(new_delta); + foreach ( var parent in _isoParents[iso_world] ) { + parent.transform.position += IsoUtils.Vec3FromVec2(new_delta); + } + foreach ( var iso_object in _isoObjects[iso_world] ) { + iso_object.FixIsoPosition(); + iso_object.positionXY = IsoUtils.VectorBeautifier(iso_object.positionXY); + } + } + } + } + + // --------------------------------------------------------------------- + // + // + // + // --------------------------------------------------------------------- + + void DisableCustomTools() { + if ( Tools.hidden ) { + Tools.hidden = false; + Tools.current = Tool.Move; + } + } + + void DrawCustomTools() { + if ( Tools.current == Tool.Move ) { + Tools.hidden = true; + XYMoveSliderTool(Handles.xAxisColor, IsoUtils.vec3OneX); + XYMoveSliderTool(Handles.yAxisColor, IsoUtils.vec3OneY); + XYMoveRectangleTool(); + } else { + Tools.hidden = false; + } + } + + // --------------------------------------------------------------------- + // + // Messages + // + // --------------------------------------------------------------------- + + void OnEnable() { + PrepareTargets(); + } + + void OnDisable() { + DisableCustomTools(); + } + + void OnSceneGUI() { + DrawCustomTools(); + } + + public override void OnInspectorGUI() { + PrepareTargets(); + DrawDefaultInspector(); + DrawCustomInspector(); + } + } +} \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/Internal/Editor/IsoSnappingParentEditor.cs.meta b/Assets/IsoTools/Scripts/Internal/Editor/IsoParentEditor.cs.meta similarity index 100% rename from Assets/IsoTools/Scripts/Internal/Editor/IsoSnappingParentEditor.cs.meta rename to Assets/IsoTools/Scripts/Internal/Editor/IsoParentEditor.cs.meta diff --git a/Assets/IsoTools/Scripts/Internal/Editor/IsoSnappingParentEditor.cs b/Assets/IsoTools/Scripts/Internal/Editor/IsoSnappingParentEditor.cs deleted file mode 100644 index 23590eb..0000000 --- a/Assets/IsoTools/Scripts/Internal/Editor/IsoSnappingParentEditor.cs +++ /dev/null @@ -1,157 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Linq; -using System.Collections.Generic; - -namespace IsoTools.Internal { - [CustomEditor(typeof(IsoSnappingParent)), CanEditMultipleObjects] - public class IsoSnappingParentEditor : Editor { - - IDictionary _parents = new Dictionary(); - IDictionary _positions = new Dictionary(); - IList _otherObjects = new List(); - Vector3 _center = Vector3.zero; - Vector3 _viewCenter = Vector3.zero; - - void GrabPositions() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - _parents = targets - .OfType() - .ToDictionary(p => p, p => p.transform.position); - foreach ( var parent in _parents ) { - var iso_objects = parent.Key.GetComponentsInChildren(true); - foreach ( var iso_object in iso_objects ) { - _positions[iso_object] = iso_object.transform.position; - } - } - _center = _viewCenter = _parents.Aggregate(Vector3.zero, (AccIn, p) => { - return AccIn + p.Key.transform.position; - }) / _parents.Count; - } else { - _parents.Clear(); - _positions.Clear(); - } - _otherObjects = FindObjectsOfType() - .Where(p => p.gameObject.activeInHierarchy && !_positions.ContainsKey(p)) - .ToList(); - } - - void DrawWorldEditorProperties() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - var so = new SerializedObject(iso_world); - EditorGUILayout.PropertyField(so.FindProperty("_showIsoBounds")); - EditorGUILayout.PropertyField(so.FindProperty("_showScreenBounds")); - EditorGUILayout.PropertyField(so.FindProperty("_showDepends")); - EditorGUILayout.PropertyField(so.FindProperty("_snappingEnabled")); - if ( GUI.changed ) { - so.ApplyModifiedProperties(); - } - } - } - - void XYMoveSlider(Color color, Vector3 dir) { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - Handles.color = color; - var delta = Handles.Slider(_viewCenter, iso_world.IsoToScreen(dir)) - _viewCenter; - if ( delta.magnitude > Mathf.Epsilon ) { - Undo.RecordObjects( - _parents.Select(p => p.Key.transform).ToArray(), - _parents.Count > 1 ? "Move IsoSnappingParents" : "Move IsoSnappingParent"); - _viewCenter = _center + IsoObjectEditor.XYMoveIsoObjects( - false, - _viewCenter - _center + delta, - _positions, - _otherObjects); - foreach ( var parent in _parents ) { - parent.Key.transform.position = parent.Value + (_viewCenter - _center); - } - foreach ( var pos in _positions ) { - pos.Key.FixIsoPosition(); - pos.Key.positionXY = IsoUtils.VectorBeautifier(pos.Key.positionXY); - } - } - } - } - - void XYMoveRectangle() { - var iso_world = IsoWorld.Instance; - if ( iso_world ) { - Handles.color = new Color( - Handles.zAxisColor.r, - Handles.zAxisColor.g, - Handles.zAxisColor.b, - 0.3f); - Handles.DotCap( - 0, - _viewCenter, - Quaternion.identity, - HandleUtility.GetHandleSize(_viewCenter) * 0.15f); - Handles.color = Handles.zAxisColor; - Handles.ArrowCap( - 0, - _viewCenter, - Quaternion.identity, - HandleUtility.GetHandleSize(_viewCenter)); - Handles.color = Handles.zAxisColor; - var delta = Handles.FreeMoveHandle( - _viewCenter, - Quaternion.identity, - HandleUtility.GetHandleSize(_viewCenter) * 0.15f, - Vector3.zero, - Handles.RectangleCap) - _viewCenter; - if ( delta.magnitude > Mathf.Epsilon ) { - Undo.RecordObjects( - _parents.Select(p => p.Key.transform).ToArray(), - _parents.Count > 1 ? "Move IsoSnappingParents" : "Move IsoSnappingParent"); - _viewCenter = _center + IsoObjectEditor.XYMoveIsoObjects( - false, - _viewCenter - _center + delta, - _positions, - _otherObjects); - foreach ( var parent in _parents ) { - parent.Key.transform.position = parent.Value + (_viewCenter - _center); - } - foreach ( var pos in _positions ) { - pos.Key.FixIsoPosition(); - pos.Key.positionXY = IsoUtils.VectorBeautifier(pos.Key.positionXY); - } - } - } - } - - // - // - // - - void OnEnable() { - GrabPositions(); - } - - void OnDisable() { - if ( Tools.hidden ) { - Tools.hidden = false; - Tools.current = Tool.Move; - } - } - - void OnSceneGUI() { - if ( Tools.current == Tool.Move ) { - Tools.hidden = true; - XYMoveSlider(Handles.xAxisColor, IsoUtils.vec3OneX); - XYMoveSlider(Handles.yAxisColor, IsoUtils.vec3OneY); - XYMoveRectangle(); - } else { - Tools.hidden = false; - } - } - - public override void OnInspectorGUI() { - DrawDefaultInspector(); - GrabPositions(); - DrawWorldEditorProperties(); - } - } -} \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/Internal/IsoBehaviour.cs b/Assets/IsoTools/Scripts/Internal/IsoBehaviour.cs index 250ad96..07e133c 100644 --- a/Assets/IsoTools/Scripts/Internal/IsoBehaviour.cs +++ b/Assets/IsoTools/Scripts/Internal/IsoBehaviour.cs @@ -1,10 +1,12 @@ using UnityEngine; +using System.Collections.Generic; namespace IsoTools.Internal { public abstract class IsoBehaviour : MonoBehaviour where T : IsoBehaviour { static IsoAssocList _behaviours = new IsoAssocList(); + static List _tempWorlds = new List(); // --------------------------------------------------------------------- // @@ -16,6 +18,20 @@ namespace IsoTools.Internal { return isActiveAndEnabled && gameObject.activeInHierarchy; } + protected IsoWorld FindFirstActiveParentWorld() { + IsoWorld ret_value = null; + GetComponentsInParent(false, _tempWorlds); + for ( int i = 0, e = _tempWorlds.Count; i < e; ++i ) { + var iso_world = _tempWorlds[i]; + if ( iso_world.IsActive() ) { + ret_value = iso_world; + break; + } + } + _tempWorlds.Clear(); + return ret_value; + } + protected static int AllBehaviourCount { get { return _behaviours.Count; } } diff --git a/Assets/IsoTools/Scripts/IsoParent.cs b/Assets/IsoTools/Scripts/IsoParent.cs new file mode 100644 index 0000000..634fee5 --- /dev/null +++ b/Assets/IsoTools/Scripts/IsoParent.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using IsoTools.Internal; + +namespace IsoTools { + [SelectionBase] + [ExecuteInEditMode, DisallowMultipleComponent] + public sealed class IsoParent : IsoBehaviour { + public IsoWorld isoWorld { + get { + return FindFirstActiveParentWorld(); + } + } + } +} \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/IsoSnappingParent.cs.meta b/Assets/IsoTools/Scripts/IsoParent.cs.meta similarity index 100% rename from Assets/IsoTools/Scripts/IsoSnappingParent.cs.meta rename to Assets/IsoTools/Scripts/IsoParent.cs.meta diff --git a/Assets/IsoTools/Scripts/IsoSnappingParent.cs b/Assets/IsoTools/Scripts/IsoSnappingParent.cs deleted file mode 100644 index 7dd7b6d..0000000 --- a/Assets/IsoTools/Scripts/IsoSnappingParent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using UnityEngine; - -namespace IsoTools { - [SelectionBase] - [ExecuteInEditMode, DisallowMultipleComponent] - public class IsoSnappingParent : MonoBehaviour { - } -} \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/IsoWorld.cs b/Assets/IsoTools/Scripts/IsoWorld.cs index 43faa13..9bb91a2 100644 --- a/Assets/IsoTools/Scripts/IsoWorld.cs +++ b/Assets/IsoTools/Scripts/IsoWorld.cs @@ -14,8 +14,6 @@ namespace IsoTools { [ExecuteInEditMode, DisallowMultipleComponent] public sealed class IsoWorld : IsoHolder { - static IsoWorld _instance = null; - bool _dirty = false; Vector2 _minXY = Vector2.zero; IsoAssocList _visibles = new IsoAssocList(); @@ -75,6 +73,7 @@ namespace IsoTools { // // --------------------------------------------------------------------- + [Header("World Settings")] [SerializeField] public float _tileSize = DefTileSize; public float tileSize { @@ -137,17 +136,16 @@ namespace IsoTools { // --------------------------------------------------------------------- // - // Instance + // Instances // // --------------------------------------------------------------------- - public static IsoWorld Instance { - get { - if ( !_instance ) { - _instance = GameObject.FindObjectOfType(); - } - return _instance; - } + public static int AllWorldCount { + get { return AllBehaviourCount; } + } + + public static IsoWorld GetWorld(int index) { + return GetBehaviourByIndex(index); } // --------------------------------------------------------------------- @@ -332,10 +330,15 @@ namespace IsoTools { get { return _showDepends; } set { _showDepends = value; } } - [SerializeField] bool _snappingEnabled = true; - public bool isSnappingEnabled { - get { return _snappingEnabled; } - set { _snappingEnabled = value; } + [SerializeField] bool _snapByCells = true; + public bool isSnapByCells { + get { return _snapByCells; } + set { _snapByCells = value; } + } + [SerializeField] bool _snapByObjects = true; + public bool isSnapByObjects { + get { return _snapByObjects; } + set { _snapByObjects = value; } } #endif