From 5cce4fd9c092970d622568c89dd135c2461e1875 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Fri, 7 Aug 2015 00:26:23 +0600 Subject: [PATCH] new sorting wip --- .../Examples/Prefabs/Kenney/Building2.prefab | 4 - .../Examples/Prefabs/Kenney/Building3.prefab | 4 - .../Examples/Prefabs/Kenney/Column.prefab | 4 - .../Examples/Prefabs/Kenney/Column2.prefab | 4 - .../Examples/Prefabs/Kenney/Road.prefab | 4 - .../Examples/Prefabs/Kenney/Road2.prefab | 4 - .../Examples/Prefabs/Kenney/Road3.prefab | 4 - .../Examples/Prefabs/Kenney/Road4.prefab | 4 - .../Examples/Prefabs/Kenney/Water.prefab | 4 - .../Examples/Prefabs/Kenney/Water2.prefab | 4 - .../Examples/Prefabs/Kenney/Water3.prefab | 4 - .../Examples/Prefabs/Kenney/Water4.prefab | 4 - Assets/IsoTools/Examples/Scenes/Scene01.unity | 196 ++++++++++++------ Assets/IsoTools/Scripts/IsoObject.cs | 7 +- Assets/IsoTools/Scripts/IsoUtils.cs | 33 ++- Assets/IsoTools/Scripts/IsoWorld.cs | 177 +++++++++------- UnityIso-csharp.sln | 2 +- UnityIso.sln | 2 +- UnityIso.userprefs | 7 +- 19 files changed, 274 insertions(+), 198 deletions(-) diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Building2.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Building2.prefab index f01fa0d..7ad0354 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Building2.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Building2.prefab @@ -155,10 +155,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: 2.5} _position: {x: 6, y: -2, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Building3.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Building3.prefab index 739540c..6b1eef5 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Building3.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Building3.prefab @@ -126,10 +126,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: 2.20000005} _position: {x: 4, y: 1, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Column.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Column.prefab index 8bfdd61..7cc8c69 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Column.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Column.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: .300000012, y: .100000001, z: .550000012} _position: {x: 2, y: 2, z: .529999971} _isAlignment: 0 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Column2.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Column2.prefab index 44d05e4..c8a2665 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Column2.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Column2.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: .300000012, y: .100000001, z: .550000012} _position: {x: 2.70000005, y: 2, z: .529999971} _isAlignment: 0 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Road.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Road.prefab index dd295bd..99e6fe5 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Road.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Road.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: 2, y: 0, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Road2.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Road2.prefab index dfe80c7..b357ec6 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Road2.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Road2.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: -2, y: 2, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Road3.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Road3.prefab index 0647473..8fac9b7 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Road3.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Road3.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: 0, y: -2, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Road4.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Road4.prefab index a4b73df..2c08fb4 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Road4.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Road4.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: 4, y: 2, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Water.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Water.prefab index 315f516..515c75f 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Water.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Water.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: 5, y: 5, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Water2.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Water2.prefab index 4d01869..aa8e818 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Water2.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Water2.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: 4, y: 5, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Water3.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Water3.prefab index b49a21d..a13c16b 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Water3.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Water3.prefab @@ -68,10 +68,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: 3, y: 5, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Prefabs/Kenney/Water4.prefab b/Assets/IsoTools/Examples/Prefabs/Kenney/Water4.prefab index 135bb60..587a96c 100644 --- a/Assets/IsoTools/Examples/Prefabs/Kenney/Water4.prefab +++ b/Assets/IsoTools/Examples/Prefabs/Kenney/Water4.prefab @@ -98,10 +98,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 0, y: 0, z: 0} - MaxSector: {x: 0, y: 0, z: 0} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 1, y: 1, z: .529999971} _position: {x: -2, y: -1, z: 0} _isAlignment: 1 diff --git a/Assets/IsoTools/Examples/Scenes/Scene01.unity b/Assets/IsoTools/Examples/Scenes/Scene01.unity index 08f85d1..090a111 100644 --- a/Assets/IsoTools/Examples/Scenes/Scene01.unity +++ b/Assets/IsoTools/Examples/Scenes/Scene01.unity @@ -104,7 +104,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 75.3845673 + value: 81.25 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -138,6 +138,10 @@ Prefab: propertyPath: m_Name value: Fence (5) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -195,7 +199,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 92.3076248 + value: 96.875 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -277,7 +281,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 12.3076925 + value: 20.3125 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -376,7 +380,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 53.8461304 + value: 23.4375 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -450,7 +454,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 460460, guid: d0e2c3af2985847769c6fc2e016c0e4d, type: 2} propertyPath: m_LocalPosition.z - value: 21.5384617 + value: 42.1875 objectReference: {fileID: 0} - target: {fileID: 460460, guid: d0e2c3af2985847769c6fc2e016c0e4d, type: 2} propertyPath: m_LocalRotation.x @@ -512,7 +516,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 13.8461542 + value: 32.8125 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -611,7 +615,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 72.3076477 + value: 78.125 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -693,7 +697,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 49.230751 + value: 73.4375 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -830,7 +834,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 79.9999466 + value: 85.9375 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -908,7 +912,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 78.4614868 + value: 84.375 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -986,7 +990,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 35.384613 + value: 4.6875 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -1060,7 +1064,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 33.8461533 + value: 59.375 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -1155,7 +1159,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 18.4615383 + value: 35.9375 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -1189,6 +1193,10 @@ Prefab: propertyPath: m_Name value: Fence (3) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -1279,7 +1287,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 50.7692108 + value: 76.5625 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -1378,7 +1386,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 460460, guid: d0e2c3af2985847769c6fc2e016c0e4d, type: 2} propertyPath: m_LocalPosition.z - value: 93.8460846 + value: 98.4375 objectReference: {fileID: 0} - target: {fileID: 460460, guid: d0e2c3af2985847769c6fc2e016c0e4d, type: 2} propertyPath: m_LocalRotation.x @@ -1436,7 +1444,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 98.4614639 + value: 21.875 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -1576,7 +1584,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 29.2307701 + value: 48.4375 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -1614,6 +1622,10 @@ Prefab: propertyPath: m_Name value: Fence2 (1) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -1671,7 +1683,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 23.0769234 + value: 43.75 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -1754,7 +1766,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 434702, guid: b89b96b93724d4f7489cd31f4f2fda48, type: 2} propertyPath: m_LocalPosition.z - value: 24.6153851 + value: 26.5625 objectReference: {fileID: 0} - target: {fileID: 434702, guid: b89b96b93724d4f7489cd31f4f2fda48, type: 2} propertyPath: m_LocalRotation.x @@ -1820,7 +1832,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 76.923027 + value: 82.8125 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -1854,6 +1866,10 @@ Prefab: propertyPath: m_Name value: Fence (4) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -1911,7 +1927,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 61.5384293 + value: 67.1875 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -1989,7 +2005,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 59.9999695 + value: 39.0625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -2067,7 +2083,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 9.23076916 + value: 17.1875 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -2166,7 +2182,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 90.769165 + value: 95.3125 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -2307,7 +2323,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 81.5384064 + value: 87.5 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -2389,7 +2405,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 52.3076706 + value: 14.0625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -2463,7 +2479,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 27.6923084 + value: 45.3125 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -2497,6 +2513,10 @@ Prefab: propertyPath: _isShowBounds value: 0 objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -2554,7 +2574,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 63.076889 + value: 70.3125 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -2667,7 +2687,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 26.1538467 + value: 46.875 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -2766,7 +2786,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 3.07692313 + value: 10.9375 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -2800,6 +2820,10 @@ Prefab: propertyPath: m_Name value: Fence (1) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -2857,7 +2881,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 66.1538086 + value: 68.75 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -2935,7 +2959,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 86.1537857 + value: 93.75 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -2973,6 +2997,10 @@ Prefab: propertyPath: m_Name value: Fence2 (2) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -3030,7 +3058,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 38.4615326 + value: 29.6875 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3108,7 +3136,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 84.6153259 + value: 92.1875 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -3146,6 +3174,10 @@ Prefab: propertyPath: m_Name value: Fence2 (3) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -3203,7 +3235,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 69.2307281 + value: 64.0625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3281,7 +3313,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 89.2307053 + value: 90.625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3359,7 +3391,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 39.9999924 + value: 56.25 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3470,7 +3502,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 43.0769119 + value: 60.9375 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -3504,6 +3536,10 @@ Prefab: propertyPath: m_Name value: Fence (7) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -3561,7 +3597,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 20 + value: 37.5 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3639,7 +3675,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 67.6922684 + value: 75 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3821,7 +3857,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 96.9230042 + value: 9.375 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -3928,7 +3964,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 4.61538458 + value: 1.5625 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -3966,6 +4002,10 @@ Prefab: propertyPath: m_Name value: Fence2 (7) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -4023,7 +4063,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 460460, guid: d0e2c3af2985847769c6fc2e016c0e4d, type: 2} propertyPath: m_LocalPosition.z - value: 41.5384521 + value: 57.8125 objectReference: {fileID: 0} - target: {fileID: 460460, guid: d0e2c3af2985847769c6fc2e016c0e4d, type: 2} propertyPath: m_LocalRotation.x @@ -4147,7 +4187,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 73.8461075 + value: 79.6875 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -4262,7 +4302,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 46.1538315 + value: 71.875 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -4361,7 +4401,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 30.7692318 + value: 28.125 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -4460,7 +4500,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 70.7691879 + value: 65.625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -4615,15 +4655,11 @@ MonoBehaviour: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1458715212} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 9a9c584f9a39449438abc7ba59a68778, type: 3} m_Name: m_EditorClassIdentifier: - MinSector: {x: 1, y: 1, z: 0} - MaxSector: {x: 3, y: 3, z: 1} - InternalMoved: 0 - InternalVisited: 0 _size: {x: 6, y: 6, z: 0} _position: {x: 1.02703384e-08, y: 1.02703384e-08, z: .529999971} _isAlignment: 0 @@ -4657,7 +4693,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 83.0768661 + value: 89.0625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -4739,7 +4775,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 10.7692308 + value: 18.75 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -4773,6 +4809,10 @@ Prefab: propertyPath: m_Name value: Fence (2) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -4830,7 +4870,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 32.3076935 + value: 53.125 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -4868,6 +4908,10 @@ Prefab: propertyPath: m_Name value: Fence2 (5) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -4925,7 +4969,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 44.6153717 + value: 62.5 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -4959,6 +5003,10 @@ Prefab: propertyPath: m_Name value: Fence (6) objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -5016,7 +5064,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 6.15384626 + value: 3.125 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -5054,6 +5102,10 @@ Prefab: propertyPath: m_Name value: Fence2 (6) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -5111,7 +5163,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalPosition.z - value: 47.6922913 + value: 54.6875 objectReference: {fileID: 0} - target: {fileID: 482272, guid: c1da36e1b472b4195a4780c9d03c52de, type: 2} propertyPath: m_LocalRotation.x @@ -5253,7 +5305,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 64.6153488 + value: 40.625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -5331,7 +5383,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalPosition.z - value: 7.69230795 + value: 15.625 objectReference: {fileID: 0} - target: {fileID: 452232, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} propertyPath: m_LocalRotation.x @@ -5369,6 +5421,10 @@ Prefab: propertyPath: m_Name value: Fence2 (4) objectReference: {fileID: 0} + - target: {fileID: 110900, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: bdd4e0dbed4fd4ea980de2f39dac8c71, type: 2} m_IsPrefabParent: 0 @@ -5426,7 +5482,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 58.4615097 + value: 51.5625 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -5504,7 +5560,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 15.3846159 + value: 12.5 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -5668,7 +5724,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 87.6922455 + value: 50 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -5746,7 +5802,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalPosition.z - value: 1.53846157 + value: 7.8125 objectReference: {fileID: 0} - target: {fileID: 436798, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} propertyPath: m_LocalRotation.x @@ -5776,6 +5832,10 @@ Prefab: propertyPath: _position.y value: -4.58497276e-08 objectReference: {fileID: 0} + - target: {fileID: 129934, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: a60889c79802a4d04a26f078003a2a8d, type: 2} m_IsPrefabParent: 0 @@ -5833,7 +5893,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 16.9230766 + value: 34.375 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -5911,7 +5971,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 36.9230728 + value: 6.25 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -5985,7 +6045,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 55.3845901 + value: 31.25 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x @@ -6063,7 +6123,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalPosition.z - value: 56.9230499 + value: 25 objectReference: {fileID: 0} - target: {fileID: 436736, guid: 30a269be2fc864c9ea00c7a65636d543, type: 2} propertyPath: m_LocalRotation.x diff --git a/Assets/IsoTools/Scripts/IsoObject.cs b/Assets/IsoTools/Scripts/IsoObject.cs index c499f51..1bfa061 100644 --- a/Assets/IsoTools/Scripts/IsoObject.cs +++ b/Assets/IsoTools/Scripts/IsoObject.cs @@ -213,7 +213,7 @@ namespace IsoTools { transform.position = IsoUtils.Vec3ChangeZ( isoWorld.IsoToScreen(position), transform.position.z); - _bounds = IsoUtils.GetIsoObjectBounds(isoWorld, this); + _bounds = IsoUtils.IsoObjectScreenBounds(isoWorld, this); } FixLastProperties(); MartDirtyIsoWorld(); @@ -255,6 +255,11 @@ namespace IsoTools { // ------------------------------------------------------------------------ void Awake() { + Internal.SelfDepends = new HashSet(new IsoObject[51]); + Internal.TheirDepends = new HashSet(new IsoObject[51]); + Internal.SelfDepends.Clear(); + Internal.TheirDepends.Clear(); + FixLastProperties(); FixIsoPosition(); } diff --git a/Assets/IsoTools/Scripts/IsoUtils.cs b/Assets/IsoTools/Scripts/IsoUtils.cs index 0e67194..74b7eb7 100644 --- a/Assets/IsoTools/Scripts/IsoUtils.cs +++ b/Assets/IsoTools/Scripts/IsoUtils.cs @@ -1,4 +1,5 @@ using UnityEngine; +using System.Collections.Generic; #if UNITY_EDITOR using UnityEditor; @@ -7,6 +8,36 @@ using UnityEditor; namespace IsoTools { public static class IsoUtils { + // --------------------------------------------------------------------- + // + // Poolable/Pool + // + // --------------------------------------------------------------------- + + public interface IPoolable { + void Reset(); + } + + public class Pool where T : IPoolable { + System.Func _createFn = null; + Stack _capacity = new Stack(); + + public Pool(System.Func create_fn) { + _createFn = create_fn; + } + + public T Pop() { + return _capacity.Count > 0 + ? _capacity.Pop() + : _createFn(); + } + + public void Push(T value) { + value.Reset(); + _capacity.Push(value); + } + } + // --------------------------------------------------------------------- // // Consts @@ -382,7 +413,7 @@ namespace IsoTools { : obj.AddComponent(); } - public static Bounds GetIsoObjectBounds(IsoWorld iso_world, IsoObject iso_object) { + public static Bounds IsoObjectScreenBounds(IsoWorld iso_world, IsoObject iso_object) { if ( iso_world ) { var z = iso_object.transform.position.z; var b = iso_world.IsoToScreen(iso_object.position); diff --git a/Assets/IsoTools/Scripts/IsoWorld.cs b/Assets/IsoTools/Scripts/IsoWorld.cs index 26363b4..d04009d 100644 --- a/Assets/IsoTools/Scripts/IsoWorld.cs +++ b/Assets/IsoTools/Scripts/IsoWorld.cs @@ -62,8 +62,10 @@ namespace IsoTools { } public void MarkDirty() { - _dirty = true; - MarkEditorWorldDirty(); + if ( !_dirty ) { + _dirty = true; + MarkEditorWorldDirty(); + } } public void MarkDirty(IsoObject iso_object) { @@ -125,11 +127,31 @@ namespace IsoTools { } bool IsIsoObjectVisible(IsoObject iso_object, Plane[] planes) { - return planes != null && planes.Length > 0 + return planes != null && planes.Length > 0 && iso_object.isActiveAndEnabled ? GeometryUtility.TestPlanesAABB(planes, iso_object.bounds) : false; } + /* + bool IsGameObjectVisible(GameObject obj) { + var renderer = obj.GetComponent(); + if ( renderer && renderer.isVisible ) { + return true; + } + var obj_transform = obj.transform; + for ( var i = 0; i < obj_transform.childCount; ++i ) { + var child_obj = obj_transform.GetChild(i).gameObject; + if ( IsGameObjectVisible(child_obj) ) { + return true; + } + } + return false; + } + + bool IsIsoObjectVisible(IsoObject iso_object) { + return IsGameObjectVisible(iso_object.gameObject); + }*/ + bool IsIsoObjectDepends(Vector3 a_min, Vector3 a_size, Vector3 b_min, Vector3 b_size) { var a_max = a_min + a_size; var b_max = b_min + b_size; @@ -189,16 +211,16 @@ namespace IsoTools { return _sectors[SectorIndex(num_pos)]; } - void LookUpSectorDepends(Vector3 num_pos, System.Action act) { + void LookUpSectorDepends(Vector3 num_pos, IsoObject obj_a) { var ms = FindSector(num_pos); if ( ms != null ) { - act(ms); + Fun1(ms, obj_a); var s1 = FindSector(num_pos + new Vector3(-1, 0, 0)); var s2 = FindSector(num_pos + new Vector3( 0, -1, 0)); var s3 = FindSector(num_pos + new Vector3(-1, -1, 0)); - if ( s1 != null ) act(s1); - if ( s2 != null ) act(s2); - if ( s3 != null ) act(s3); + if ( s1 != null ) Fun1(s1, obj_a); + if ( s2 != null ) Fun1(s2, obj_a); + if ( s3 != null ) Fun1(s3, obj_a); for ( var i = 0; i <= _sectorsNumPosCount.z; ++i ) { var ss1 = FindSector(num_pos + new Vector3( 0 - i, 0 - i, i + 1)); var ss2 = FindSector(num_pos + new Vector3(-1 - i, 0 - i, i + 1)); @@ -207,27 +229,27 @@ namespace IsoTools { var ss5 = FindSector(num_pos + new Vector3(-2 - i, -1 - i, i + 1)); var ss6 = FindSector(num_pos + new Vector3(-1 - i, -2 - i, i + 1)); var ss7 = FindSector(num_pos + new Vector3(-2 - i, -2 - i, i + 1)); - if ( ss1 != null ) act(ss1); - if ( ss2 != null ) act(ss2); - if ( ss3 != null ) act(ss3); - if ( ss4 != null ) act(ss4); - if ( ss5 != null ) act(ss5); - if ( ss6 != null ) act(ss6); - if ( ss7 != null ) act(ss7); + if ( ss1 != null ) Fun1(ss1, obj_a); + if ( ss2 != null ) Fun1(ss2, obj_a); + if ( ss3 != null ) Fun1(ss3, obj_a); + if ( ss4 != null ) Fun1(ss4, obj_a); + if ( ss5 != null ) Fun1(ss5, obj_a); + if ( ss6 != null ) Fun1(ss6, obj_a); + if ( ss7 != null ) Fun1(ss7, obj_a); } } } - void LookUpSectorRDepends(Vector3 num_pos, System.Action act) { + void LookUpSectorRDepends(Vector3 num_pos, IsoObject obj_a) { var ms = FindSector(num_pos); if ( ms != null ) { - act(ms); + Fun2(ms, obj_a); var s1 = FindSector(num_pos + new Vector3( 1, 0, 0)); var s2 = FindSector(num_pos + new Vector3( 0, 1, 0)); var s3 = FindSector(num_pos + new Vector3( 1, 1, 0)); - if ( s1 != null ) act(s1); - if ( s2 != null ) act(s2); - if ( s3 != null ) act(s3); + if ( s1 != null ) Fun2(s1, obj_a); + if ( s2 != null ) Fun2(s2, obj_a); + if ( s3 != null ) Fun2(s3, obj_a); for ( var i = 0; i <= _sectorsNumPosCount.z; ++i ) { var ss1 = FindSector(num_pos + new Vector3( 0 + i, 0 + i, -i - 1)); var ss2 = FindSector(num_pos + new Vector3( 1 + i, 0 + i, -i - 1)); @@ -236,13 +258,13 @@ namespace IsoTools { var ss5 = FindSector(num_pos + new Vector3( 2 + i, 1 + i, -i - 1)); var ss6 = FindSector(num_pos + new Vector3( 1 + i, 2 + i, -i - 1)); var ss7 = FindSector(num_pos + new Vector3( 2 + i, 2 + i, -i - 1)); - if ( ss1 != null ) act(ss1); - if ( ss2 != null ) act(ss2); - if ( ss3 != null ) act(ss3); - if ( ss4 != null ) act(ss4); - if ( ss5 != null ) act(ss5); - if ( ss6 != null ) act(ss6); - if ( ss7 != null ) act(ss7); + if ( ss1 != null ) Fun2(ss1, obj_a); + if ( ss2 != null ) Fun2(ss2, obj_a); + if ( ss3 != null ) Fun2(ss3, obj_a); + if ( ss4 != null ) Fun2(ss4, obj_a); + if ( ss5 != null ) Fun2(ss5, obj_a); + if ( ss6 != null ) Fun2(ss6, obj_a); + if ( ss7 != null ) Fun2(ss7, obj_a); } } } @@ -324,9 +346,13 @@ namespace IsoTools { } void StepSort() { + //Profiler.BeginSample("UpdateVisibles"); UpdateVisibles(); + //Profiler.EndSample(); if ( _dirty ) { + //Profiler.BeginSample("PlaceAllVisibles"); PlaceAllVisibles(); + //Profiler.EndSample(); _dirty = false; } } @@ -338,50 +364,50 @@ namespace IsoTools { SetupObjectsSectors(); SetupSectors(); - var new_count = 0; var visibles_iter = _visibles.GetEnumerator(); while ( visibles_iter.MoveNext() ) { var iso_object = visibles_iter.Current; if ( iso_object.Internal.Moved || !_oldVisibles.Contains(iso_object) ) { - MarkDirty(); - SetupIsoObjectDepends(iso_object); - iso_object.Internal.Moved = false; - ++new_count; + iso_object.Internal.Moved = true; + } + } + + visibles_iter = _visibles.GetEnumerator(); + while ( visibles_iter.MoveNext() ) { + var iso_object = visibles_iter.Current; + if ( iso_object.Internal.Moved ) { + MarkDirty(); + SetupIsoObjectDepends(iso_object); + iso_object.Internal.Moved = false; } } - var old_count = 0; var old_visibles_iter = _oldVisibles.GetEnumerator(); while ( old_visibles_iter.MoveNext() ) { var iso_object = old_visibles_iter.Current; if ( !_visibles.Contains(iso_object) ) { MarkDirty(); ClearIsoObjectDepends(iso_object); - ++old_count; } } - - if ( new_count > 0 || old_count > 0 ) { - /*Debug.LogFormat( - "New or moved: {0}, Missings: {1}, Visibles: {2}, All: {3}", - new_count, old_count, _visibles.Count, _objects.Count);*/ - } } void CalculateNewVisibles() { var planes = Camera.current ? GeometryUtility.CalculateFrustumPlanes(Camera.current) : null; - _oldVisibles.Clear(); - var objects_iter = _objects.GetEnumerator(); - while ( objects_iter.MoveNext() ) { - var iso_object = objects_iter.Current; - if ( IsIsoObjectVisible(iso_object, planes) ) { - iso_object.Internal.Visited = false; - _oldVisibles.Add(iso_object); + if ( planes != null && planes.Length > 0 ) { + _oldVisibles.Clear(); + var objects_iter = _objects.GetEnumerator(); + while ( objects_iter.MoveNext() ) { + var iso_object = objects_iter.Current; + if ( IsIsoObjectVisible(iso_object, planes) ) { + iso_object.Internal.Visited = false; + _oldVisibles.Add(iso_object); + } } + var old_visibles = _visibles; + _visibles = _oldVisibles; + _oldVisibles = old_visibles; } - var old_visibles = _visibles; - _visibles = _oldVisibles; - _oldVisibles = old_visibles; } void ClearIsoObjectDepends(IsoObject iso_object) { @@ -393,6 +419,27 @@ namespace IsoTools { iso_object.Internal.TheirDepends.Clear(); } + void Fun1(SectorInfo sec, IsoObject obj_a) { + var sec_objects_iter = sec.objects.GetEnumerator(); + while ( sec_objects_iter.MoveNext() ) { + var obj_b = sec_objects_iter.Current; + if ( obj_a != obj_b && !obj_b.Internal.Moved && IsIsoObjectDepends(obj_a, obj_b) ) { + obj_a.Internal.SelfDepends.Add(obj_b); + obj_b.Internal.TheirDepends.Add(obj_a); + } + } + } + void Fun2(SectorInfo sec, IsoObject obj_a) { + var sec_objects_iter = sec.objects.GetEnumerator(); + while ( sec_objects_iter.MoveNext() ) { + var obj_b = sec_objects_iter.Current; + if ( obj_a != obj_b && !obj_b.Internal.Moved && IsIsoObjectDepends(obj_b, obj_a) ) { + obj_b.Internal.SelfDepends.Add(obj_a); + obj_a.Internal.TheirDepends.Add(obj_b); + } + } + } + void SetupIsoObjectDepends(IsoObject obj_a) { ClearIsoObjectDepends(obj_a); var min = obj_a.Internal.MinSector; @@ -400,31 +447,13 @@ namespace IsoTools { for ( var z = min.z; z < max.z; ++z ) { for ( var y = min.y; y < max.y; ++y ) { for ( var x = min.x; x < max.x; ++x ) { - LookUpSectorDepends(new Vector3(x, y, z), sec => { - var sec_objects_iter = sec.objects.GetEnumerator(); - while ( sec_objects_iter.MoveNext() ) { - var obj_b = sec_objects_iter.Current; - if ( obj_a != obj_b && IsIsoObjectDepends(obj_a, obj_b) ) { - obj_a.Internal.SelfDepends.Add(obj_b); - obj_b.Internal.TheirDepends.Add(obj_a); - } - } - }); - }}} - for ( var z = min.z; z < max.z; ++z ) { - for ( var y = min.y; y < max.y; ++y ) { - for ( var x = min.x; x < max.x; ++x ) { - LookUpSectorRDepends(new Vector3(x, y, z), sec => { - var sec_objects_iter = sec.objects.GetEnumerator(); - while ( sec_objects_iter.MoveNext() ) { - var obj_b = sec_objects_iter.Current; - if ( obj_a != obj_b && IsIsoObjectDepends(obj_b, obj_a) ) { - obj_b.Internal.SelfDepends.Add(obj_a); - obj_a.Internal.TheirDepends.Add(obj_b); - } - } - }); + var v = new Vector3(x, y, z); + LookUpSectorDepends(v, obj_a); + LookUpSectorRDepends(v, obj_a); }}} + if ( obj_a.Internal.SelfDepends.Count > 45 ) { + //Debug.LogFormat("Self: {0}, Their: {1}", obj_a.Internal.SelfDepends.Count, obj_a.Internal.TheirDepends.Count); + } } void PlaceAllVisibles() { diff --git a/UnityIso-csharp.sln b/UnityIso-csharp.sln index 9e20627..102eee1 100644 --- a/UnityIso-csharp.sln +++ b/UnityIso-csharp.sln @@ -23,7 +23,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Assembly-CSharp.csproj Policies = $0 $0.TextStylePolicy = $1 diff --git a/UnityIso.sln b/UnityIso.sln index 7ef20a9..b5b5cca 100644 --- a/UnityIso.sln +++ b/UnityIso.sln @@ -23,7 +23,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution + GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Assembly-CSharp.csproj Policies = $0 $0.TextStylePolicy = $1 diff --git a/UnityIso.userprefs b/UnityIso.userprefs index 7cc638b..5458455 100644 --- a/UnityIso.userprefs +++ b/UnityIso.userprefs @@ -1,10 +1,9 @@  - + - - - + +