diff --git a/Assembly-CSharp-Editor-vs.csproj b/Assembly-CSharp-Editor-vs.csproj index 8bcb0bb..e4fc13b 100644 --- a/Assembly-CSharp-Editor-vs.csproj +++ b/Assembly-CSharp-Editor-vs.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_0_1;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX + DEBUG;TRACE;UNITY_5_0_2;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX prompt 4 0169 @@ -46,7 +46,6 @@ - /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll @@ -66,6 +65,9 @@ /Applications/Unity/Unity.app/Contents/PlaybackEngines/BlackBerryPlayer/UnityEditor.BB10.Extensions.dll + + /Applications/Unity/Unity.app/Contents/PlaybackEngines/STVPlayer/STVPlayer/UnityEditor.SamsungTV.Extensions.dll + /Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll diff --git a/Assembly-CSharp-Editor.csproj b/Assembly-CSharp-Editor.csproj index c63ec08..40e08ba 100644 --- a/Assembly-CSharp-Editor.csproj +++ b/Assembly-CSharp-Editor.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_0_1;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX + DEBUG;TRACE;UNITY_5_0_2;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX prompt 4 0169 @@ -46,7 +46,6 @@ - /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll @@ -66,6 +65,9 @@ /Applications/Unity/Unity.app/Contents/PlaybackEngines/BlackBerryPlayer/UnityEditor.BB10.Extensions.dll + + /Applications/Unity/Unity.app/Contents/PlaybackEngines/STVPlayer/STVPlayer/UnityEditor.SamsungTV.Extensions.dll + /Applications/Unity/Unity.app/Contents/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll diff --git a/Assembly-CSharp-vs.csproj b/Assembly-CSharp-vs.csproj index 49dfa17..397aa19 100644 --- a/Assembly-CSharp-vs.csproj +++ b/Assembly-CSharp-vs.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_0_1;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX + DEBUG;TRACE;UNITY_5_0_2;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX prompt 4 0169 diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 49dfa17..397aa19 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -19,7 +19,7 @@ full false Temp\bin\Debug\ - DEBUG;TRACE;UNITY_5_0_1;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX + DEBUG;TRACE;UNITY_5_0_2;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX prompt 4 0169 diff --git a/Assets/IsoTools/Editor/IsoEditorWindow.cs b/Assets/IsoTools/Editor/IsoEditorWindow.cs deleted file mode 100644 index c35347f..0000000 --- a/Assets/IsoTools/Editor/IsoEditorWindow.cs +++ /dev/null @@ -1,59 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Linq; - -namespace IsoTools { - public class IsoEditorWindow : EditorWindow { - - public static bool Alignment { get; private set; } - public static bool ShowBounds { get; private set; } - - static string _alignmentPropName = "IsoTools.IsoEditorWindow.Alignment"; - static string _showBoundsPropName = "IsoTools.IsoEditorWindow.ShowBounds"; - - void AlignmentSelection() { - var iso_objects = Selection.gameObjects - .Where(p => p.GetComponent()) - .Select(p => p.GetComponent()); - foreach ( var iso_object in iso_objects ) { - iso_object.Position = iso_object.TilePosition; - iso_object.FixTransform(); - } - } - - [MenuItem("IsoTools/IsoEditor")] - static void Init() { - var window = EditorWindow.GetWindow(); - window.title = "IsoEditor"; - window.Show(); - } - - void OnGUI() { - GUILayout.Space(5); - ShowBounds = EditorGUILayout.Toggle("Show bounds", ShowBounds); - Alignment = EditorGUILayout.Toggle("Auto alignment", Alignment); - if ( GUILayout.Button("Alignment selection objects") || Alignment ) { - AlignmentSelection(); - } - } - - void OnFocus() { - if ( EditorPrefs.HasKey(_alignmentPropName) ) { - Alignment = EditorPrefs.GetBool(_alignmentPropName); - } - if ( EditorPrefs.HasKey(_showBoundsPropName) ) { - ShowBounds = EditorPrefs.GetBool(_showBoundsPropName); - } - } - - void OnLostFocus() { - EditorPrefs.SetBool(_alignmentPropName, Alignment); - EditorPrefs.SetBool(_showBoundsPropName, ShowBounds); - } - - void OnDestroy() { - EditorPrefs.SetBool(_alignmentPropName, Alignment); - EditorPrefs.SetBool(_showBoundsPropName, ShowBounds); - } - } -} \ No newline at end of file diff --git a/Assets/IsoTools/Editor/IsoEditorWindow.cs.meta b/Assets/IsoTools/Editor/IsoEditorWindow.cs.meta deleted file mode 100644 index 8cbd103..0000000 --- a/Assets/IsoTools/Editor/IsoEditorWindow.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bc6645583f19a4c99b26459ef98d0d9c -timeCreated: 1431871954 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IsoTools/Editor/IsoObjectEditor.cs b/Assets/IsoTools/Editor/IsoObjectEditor.cs index c600c9d..dc5b7c7 100644 --- a/Assets/IsoTools/Editor/IsoObjectEditor.cs +++ b/Assets/IsoTools/Editor/IsoObjectEditor.cs @@ -26,21 +26,33 @@ namespace IsoTools { }) / _positions.Count; } - void AlignmentIsoObject(IsoObject iso_object) { - if ( IsoEditorWindow.Alignment ) { - iso_object.Position = iso_object.TilePosition; - iso_object.FixTransform(); + bool IsAnyAlignment { + get { return _positions.Keys.Any(p => p.Alignment); } + } + + void AlignmentSelection() { + foreach ( var iso_object in _positions.Keys ) { + AlignmentIsoObject(iso_object); } + GrabPositions(); + } + + void AlignmentIsoObject(IsoObject iso_object) { + iso_object.Position = iso_object.TilePosition; + iso_object.FixTransform(); } float ZMoveIsoObjects(float delta) { Undo.RecordObjects(_iso_zpositions.Keys.ToArray(), "Move"); + var is_any_alignment = IsAnyAlignment; return _iso_zpositions.Aggregate(0.0f, (AccIn, pair) => { var iso_object = pair.Key; var iso_orig_z = pair.Value; iso_object.PositionZ = iso_orig_z + delta; iso_object.FixTransform(); - AlignmentIsoObject(iso_object); + if ( is_any_alignment ) { + AlignmentIsoObject(iso_object); + } var z_delta = iso_object.Position.z - iso_orig_z; return Mathf.Abs(z_delta) > Mathf.Abs(AccIn) ? z_delta : AccIn; }); @@ -48,12 +60,15 @@ namespace IsoTools { Vector3 XYMoveIsoObjects(Vector3 delta) { Undo.RecordObjects(_positions.Keys.ToArray(), "Move"); + var is_any_alignment = IsAnyAlignment; return _positions.Aggregate(Vector3.zero, (AccIn, pair) => { var iso_object = pair.Key; var iso_orig_p = pair.Value; iso_object.transform.position = iso_orig_p + delta; iso_object.FixIsoPosition(); - AlignmentIsoObject(iso_object); + if ( is_any_alignment ) { + AlignmentIsoObject(iso_object); + } var pos_delta = iso_object.transform.position - iso_orig_p; return pos_delta.magnitude > AccIn.magnitude ? pos_delta : AccIn; }); @@ -111,47 +126,6 @@ namespace IsoTools { } } - void DrawTop(Vector3 pos, Vector3 size) { - var iso_world = GameObject.FindObjectOfType(); - if ( iso_world ) { - var points = new Vector3[]{ - iso_world.IsoToScreen(pos), - iso_world.IsoToScreen(pos + IsoUtils.Vec3FromX(size.x)), - iso_world.IsoToScreen(pos + IsoUtils.Vec3FromXY(size.x, size.y)), - iso_world.IsoToScreen(pos + IsoUtils.Vec3FromY(size.y)), - iso_world.IsoToScreen(pos) - }; - Handles.DrawPolyLine(points); - } - } - - void DrawVert(Vector3 pos, Vector3 size) { - var iso_world = GameObject.FindObjectOfType(); - if ( iso_world ) { - Handles.DrawLine( - iso_world.IsoToScreen(pos), - iso_world.IsoToScreen(pos + IsoUtils.Vec3FromZ(size.z))); - } - } - - void DrawCube(Vector3 pos, Vector3 size) { - Handles.color = Color.green; - DrawTop (pos - IsoUtils.Vec3FromZ(0.5f), size); - DrawTop (pos + IsoUtils.Vec3FromZ(size.z - 0.5f), size); - DrawVert(pos - IsoUtils.Vec3FromZ(0.5f), size); - DrawVert(pos - IsoUtils.Vec3FromZ(0.5f) + IsoUtils.Vec3FromX(size.x), size); - DrawVert(pos - IsoUtils.Vec3FromZ(0.5f) + IsoUtils.Vec3FromY(size.y), size); - } - - void DrawTargetBounds() { - if ( IsoEditorWindow.ShowBounds ) { - var iso_object = target as IsoObject; - if ( iso_object ) { - DrawCube(iso_object.Position, iso_object.Size); - } - } - } - void OnEnable() { GrabPositions(); } @@ -170,12 +144,14 @@ namespace IsoTools { } else { Tools.hidden = false; } - DrawTargetBounds(); } public override void OnInspectorGUI() { DrawDefaultInspector(); GrabPositions(); + if ( GUILayout.Button("Alignment selection") ) { + AlignmentSelection(); + } } } } // namespace IsoTools \ No newline at end of file diff --git a/Assets/IsoTools/Examples/Prefabs/BoxPhysicMaterial.physicMaterial b/Assets/IsoTools/Examples/Prefabs/BoxPhysicMaterial.physicMaterial index e1292ce..f31e26a 100644 --- a/Assets/IsoTools/Examples/Prefabs/BoxPhysicMaterial.physicMaterial +++ b/Assets/IsoTools/Examples/Prefabs/BoxPhysicMaterial.physicMaterial @@ -8,7 +8,7 @@ PhysicMaterial: m_Name: BoxPhysicMaterial dynamicFriction: .600000024 staticFriction: .600000024 - bounciness: .400000006 + bounciness: .800000012 frictionCombine: 0 bounceCombine: 0 frictionDirection2: {x: 0, y: 0, z: 0} diff --git a/Assets/IsoTools/Examples/Scenes/Scene5.unity b/Assets/IsoTools/Examples/Scenes/Scene5.unity index 27f7bda..f1fc96f 100644 --- a/Assets/IsoTools/Examples/Scenes/Scene5.unity +++ b/Assets/IsoTools/Examples/Scenes/Scene5.unity @@ -104,7 +104,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalPosition.z - value: 37.5 + value: 50 objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalRotation.x @@ -308,7 +308,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalPosition.z - value: 87.5 + value: 90 objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalRotation.x @@ -390,7 +390,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalPosition.z - value: 75 + value: 80 objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalRotation.x @@ -472,7 +472,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalPosition.z - value: 62.5 + value: 70 objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalRotation.x @@ -550,7 +550,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalPosition.z - value: 50 + value: 60 objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalRotation.x @@ -738,7 +738,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalPosition.z - value: 25 + value: 40 objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalRotation.x @@ -832,7 +832,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalPosition.z - value: 22.2222214 + value: 30 objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalRotation.x @@ -926,7 +926,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalPosition.z - value: 0 + value: 20 objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_LocalRotation.x @@ -946,7 +946,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: m_RootOrder - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 11417528, guid: c1b9b2ad3a021c549aa9190df3101248, type: 2} propertyPath: _position.x @@ -1020,7 +1020,7 @@ Prefab: objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalPosition.z - value: 12.5 + value: 10 objectReference: {fileID: 0} - target: {fileID: 453404, guid: d10e5320df9f84d4186bda0ba98db9ff, type: 2} propertyPath: m_LocalRotation.x diff --git a/Assets/IsoTools/Examples/Scenes/Scene6.unity b/Assets/IsoTools/Examples/Scenes/Scene6.unity index 93e5726..526a233 100644 --- a/Assets/IsoTools/Examples/Scenes/Scene6.unity +++ b/Assets/IsoTools/Examples/Scenes/Scene6.unity @@ -87,1333 +87,67 @@ NavMeshSettings: cellSize: .166666672 manualCellSize: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &64785346 +--- !u!1 &48228377 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 4 m_Component: - - 4: {fileID: 64785350} - - 33: {fileID: 64785349} - - 65: {fileID: 64785348} - - 23: {fileID: 64785347} - - 54: {fileID: 64785351} + - 4: {fileID: 48228383} + - 20: {fileID: 48228382} + - 124: {fileID: 48228381} + - 92: {fileID: 48228380} + - 81: {fileID: 48228379} + - 114: {fileID: 48228378} m_Layer: 0 - m_Name: Cube 1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &64785347 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 64785346} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &64785348 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 64785346} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &64785349 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 64785346} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &64785350 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 64785346} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: .5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 16 ---- !u!54 &64785351 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 64785346} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!1 &502511166 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 502511171} - - 33: {fileID: 502511170} - - 65: {fileID: 502511169} - - 23: {fileID: 502511168} - - 54: {fileID: 502511167} - m_Layer: 0 - m_Name: Cube 11 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &502511167 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 502511166} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &502511168 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 502511166} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &502511169 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 502511166} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &502511170 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 502511166} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &502511171 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 502511166} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: .5, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 ---- !u!1 &536521127 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 536521132} - - 33: {fileID: 536521131} - - 65: {fileID: 536521130} - - 23: {fileID: 536521129} - - 54: {fileID: 536521128} - m_Layer: 0 - m_Name: Cube 13 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &536521128 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 536521127} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &536521129 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 536521127} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &536521130 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 536521127} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &536521131 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 536521127} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &536521132 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 536521127} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: .5, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 ---- !u!1 &604378161 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 604378166} - - 33: {fileID: 604378165} - - 65: {fileID: 604378164} - - 23: {fileID: 604378163} - - 54: {fileID: 604378162} - m_Layer: 0 - m_Name: Cube 10 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &604378162 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 604378161} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &604378163 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 604378161} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &604378164 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 604378161} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &604378165 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 604378161} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &604378166 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 604378161} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: .5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 ---- !u!1 &706630492 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 706630497} - - 33: {fileID: 706630496} - - 65: {fileID: 706630495} - - 23: {fileID: 706630494} - - 54: {fileID: 706630493} - m_Layer: 0 - m_Name: Cube 7 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &706630493 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 706630492} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &706630494 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 706630492} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &706630495 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 706630492} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &706630496 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 706630492} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &706630497 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 706630492} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2, y: .5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 9 ---- !u!1 &792301305 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 792301310} - - 33: {fileID: 792301309} - - 65: {fileID: 792301308} - - 23: {fileID: 792301307} - - 54: {fileID: 792301306} - m_Layer: 0 - m_Name: Cube 15 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &792301306 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 792301305} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &792301307 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 792301305} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &792301308 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 792301305} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &792301309 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 792301305} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &792301310 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 792301305} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 1.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 ---- !u!1 &949117221 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 949117225} - - 33: {fileID: 949117224} - - 65: {fileID: 949117223} - - 23: {fileID: 949117222} - - 54: {fileID: 949117226} - m_Layer: 0 - m_Name: Cube 3 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &949117222 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 949117221} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &949117223 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 949117221} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &949117224 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 949117221} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &949117225 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 949117221} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: .5, z: 1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 13 ---- !u!54 &949117226 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 949117221} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!1 &1128116970 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1128116975} - - 33: {fileID: 1128116974} - - 65: {fileID: 1128116973} - - 23: {fileID: 1128116972} - - 54: {fileID: 1128116971} - m_Layer: 0 - m_Name: Cube 9 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1128116971 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1128116970} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &1128116972 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1128116970} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1128116973 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1128116970} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1128116974 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1128116970} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1128116975 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1128116970} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: .5, z: 1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 7 ---- !u!1 &1141897488 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1141897493} - - 33: {fileID: 1141897492} - - 65: {fileID: 1141897491} - - 23: {fileID: 1141897490} - - 54: {fileID: 1141897489} - m_Layer: 0 - m_Name: Cube 12 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1141897489 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1141897488} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &1141897490 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1141897488} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1141897491 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1141897488} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1141897492 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1141897488} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1141897493 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1141897488} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2, y: .5, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 ---- !u!1 &1202395150 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1202395155} - - 33: {fileID: 1202395154} - - 65: {fileID: 1202395153} - - 23: {fileID: 1202395152} - - 54: {fileID: 1202395151} - m_Layer: 0 - m_Name: Cube 5 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1202395151 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1202395150} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &1202395152 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1202395150} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1202395153 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1202395150} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1202395154 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1202395150} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1202395155 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1202395150} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: .5, z: 1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 11 ---- !u!1 &1261760023 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1261760025} - - 108: {fileID: 1261760024} - m_Layer: 0 - m_Name: Point light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1261760024 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1261760023} - m_Enabled: 1 - serializedVersion: 6 - m_Type: 2 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 0 - m_Resolution: -1 - m_Strength: 1 - m_Bias: .0500000007 - m_NormalBias: .400000006 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_BounceIntensity: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_AreaSize: {x: 1, y: 1} ---- !u!4 &1261760025 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1261760023} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 5.32000017, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 18 ---- !u!1 &1378981187 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1378981191} - - 33: {fileID: 1378981190} - - 65: {fileID: 1378981189} - - 23: {fileID: 1378981188} - - 54: {fileID: 1378981192} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1378981188 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1378981187} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1378981189 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1378981187} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1378981190 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1378981187} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1378981191 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1378981187} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: .5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 15 ---- !u!54 &1378981192 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1378981187} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!1 &1413638025 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1413638029} - - 33: {fileID: 1413638028} - - 65: {fileID: 1413638027} - - 23: {fileID: 1413638026} - - 54: {fileID: 1413638030} - - 114: {fileID: 1413638031} - - 135: {fileID: 1413638033} - - 135: {fileID: 1413638032} - - 135: {fileID: 1413638035} - - 135: {fileID: 1413638034} - m_Layer: 0 - m_Name: Cube 4 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1413638026 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1413638027 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1413638028 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1413638029 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: .360000014, y: 2.05999994, z: .333000004} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 12 ---- !u!54 &1413638030 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!114 &1413638031 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9cfa1a0fcac84495198236a2cf26f286, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!135 &1413638032 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .101000004 - m_Center: {x: .400000006, y: -.400000006, z: -.400000006} ---- !u!135 &1413638033 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .101000004 - m_Center: {x: .400000006, y: -.400000006, z: .400000006} ---- !u!135 &1413638034 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .101000004 - m_Center: {x: -.400000006, y: -.400000006, z: -.400000006} ---- !u!135 &1413638035 -SphereCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1413638025} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: .101000004 - m_Center: {x: -.400000006, y: -.400000006, z: .400000006} ---- !u!1 &1468961718 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1468961723} - - 33: {fileID: 1468961722} - - 65: {fileID: 1468961721} - - 23: {fileID: 1468961720} - - 54: {fileID: 1468961719} - m_Layer: 0 - m_Name: Cube 6 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1468961719 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1468961718} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &1468961720 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1468961718} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1468961721 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1468961718} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1468961722 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1468961718} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1468961723 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1468961718} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: .5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 10 ---- !u!1 &1504735947 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1504735952} - - 20: {fileID: 1504735951} - - 92: {fileID: 1504735950} - - 124: {fileID: 1504735949} - - 81: {fileID: 1504735948} - m_Layer: 0 - m_Name: Main Camera + m_Name: Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!81 &1504735948 +--- !u!114 &48228378 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 48228377} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3f01619d3802e814f86f9e6bb965349a, type: 3} + m_Name: + m_EditorClassIdentifier: + _tileSize: 65 + _minDepth: 0 + _maxDepth: 100 +--- !u!81 &48228379 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1504735947} + m_GameObject: {fileID: 48228377} m_Enabled: 1 ---- !u!124 &1504735949 +--- !u!92 &48228380 Behaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1504735947} + m_GameObject: {fileID: 48228377} m_Enabled: 1 ---- !u!92 &1504735950 +--- !u!124 &48228381 Behaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1504735947} + m_GameObject: {fileID: 48228377} m_Enabled: 1 ---- !u!20 &1504735951 +--- !u!20 &48228382 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1504735947} + m_GameObject: {fileID: 48228377} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 @@ -1424,12 +158,12 @@ Camera: y: 0 width: 1 height: 1 - near clip plane: .300000012 + near clip plane: -.300000012 far clip plane: 1000 field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 + orthographic: 1 + orthographic size: 250 + m_Depth: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 @@ -1440,371 +174,15 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: .0219999999 ---- !u!4 &1504735952 +--- !u!4 &48228383 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1504735947} - m_LocalRotation: {x: .211012065, y: 0, z: 0, w: .977483511} - m_LocalPosition: {x: 0, y: 5.07999992, z: -5.07999992} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 17 ---- !u!1 &1556720107 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1556720112} - - 33: {fileID: 1556720111} - - 65: {fileID: 1556720110} - - 23: {fileID: 1556720109} - - 54: {fileID: 1556720108} - m_Layer: 0 - m_Name: Cube 14 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1556720108 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1556720107} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &1556720109 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1556720107} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1556720110 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1556720107} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1556720111 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1556720107} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1556720112 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1556720107} + m_GameObject: {fileID: 48228377} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: .5, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 ---- !u!1 &1615294136 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1615294140} - - 33: {fileID: 1615294139} - - 65: {fileID: 1615294138} - - 23: {fileID: 1615294137} - - 54: {fileID: 1615294141} - m_Layer: 0 - m_Name: Cube 2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1615294137 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615294136} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1615294138 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615294136} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1615294139 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615294136} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1615294140 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615294136} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: .5, z: 1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 14 ---- !u!54 &1615294141 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615294136} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!1 &1645300934 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1645300939} - - 33: {fileID: 1645300938} - - 65: {fileID: 1645300937} - - 23: {fileID: 1645300936} - - 54: {fileID: 1645300935} - m_Layer: 0 - m_Name: Cube 16 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1645300935 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1645300934} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &1645300936 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1645300934} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &1645300937 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1645300934} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1645300938 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1645300934} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1645300939 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1645300934} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 1.5, z: 2} + m_LocalPosition: {x: 151, y: 162, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 ---- !u!1 &2003156209 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 2003156214} - - 33: {fileID: 2003156213} - - 65: {fileID: 2003156212} - - 23: {fileID: 2003156211} - - 54: {fileID: 2003156210} - m_Layer: 0 - m_Name: Cube 8 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &2003156210 -Rigidbody: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2003156209} - serializedVersion: 2 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: .0500000007 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!23 &2003156211 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2003156209} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_SubsetIndices: - m_StaticBatchRoot: {fileID: 0} - m_UseLightProbes: 1 - m_ReflectionProbeUsage: 1 - m_ProbeAnchor: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_ImportantGI: 0 - m_AutoUVMaxDistance: .5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingOrder: 0 ---- !u!65 &2003156212 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2003156209} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &2003156213 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2003156209} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &2003156214 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2003156209} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2, y: .5, z: 1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 8 diff --git a/Assets/IsoTools/Scripts/IsoObject.cs b/Assets/IsoTools/Scripts/IsoObject.cs index 5f85292..e610813 100644 --- a/Assets/IsoTools/Scripts/IsoObject.cs +++ b/Assets/IsoTools/Scripts/IsoObject.cs @@ -8,12 +8,6 @@ namespace IsoTools { [ExecuteInEditMode] public class IsoObject : MonoBehaviour { - #if UNITY_EDITOR - Vector3 _lastSize = Vector3.zero; - Vector3 _lastPosition = Vector3.zero; - Vector2 _lastTransform = Vector2.zero; - #endif - // ------------------------------------------------------------------------ // // Size @@ -161,6 +155,29 @@ namespace IsoTools { get { return new Vector2(TilePositionX, TilePositionZ); } } + // ------------------------------------------------------------------------ + // + // For editor + // + // ------------------------------------------------------------------------ + + #if UNITY_EDITOR + Vector3 _lastSize = Vector3.zero; + Vector3 _lastPosition = Vector3.zero; + Vector2 _lastTransform = Vector2.zero; + + [SerializeField] bool _alignment = true; + [SerializeField] bool _showBounds = false; + + public bool Alignment { + get { return _alignment; } + } + + public bool ShowBounds { + get { return _showBounds; } + } + #endif + // ------------------------------------------------------------------------ // // Functions @@ -185,6 +202,11 @@ namespace IsoTools { } public void FixTransform() { + #if UNITY_EDITOR + if ( Application.isEditor && !Application.isPlaying && Alignment ) { + _position = TilePosition; + } + #endif transform.position = IsoUtils.Vec3ChangeZ( IsoWorld.IsoToScreen(Position), transform.position.z); @@ -228,22 +250,23 @@ namespace IsoTools { MartDirtyIsoWorld(); } - //TODO: now working for child sprites - void OnBecameVisible() { - MartDirtyIsoWorld(); + #if UNITY_EDITOR + void OnDrawGizmos() { + if ( ShowBounds ) { + IsoUtils.DrawCube(Position, Size, Color.red); + } } - #if UNITY_EDITOR void Update() { if ( Application.isEditor ) { - if ( !IsoUtils.Vec2Approximately(_lastTransform, transform.position) ) { - FixIsoPosition(); + if ( !IsoUtils.Vec3Approximately(_lastSize, _size) ) { + Size = _size; } if ( !IsoUtils.Vec3Approximately(_lastPosition, _position) ) { Position = _position; } - if ( !IsoUtils.Vec3Approximately(_lastSize, _size) ) { - Size = _size; + if ( !IsoUtils.Vec2Approximately(_lastTransform, transform.position) ) { + FixIsoPosition(); } } } diff --git a/Assets/IsoTools/Scripts/IsoRigidbody.cs b/Assets/IsoTools/Scripts/IsoRigidbody.cs index 39d3615..f4ab694 100644 --- a/Assets/IsoTools/Scripts/IsoRigidbody.cs +++ b/Assets/IsoTools/Scripts/IsoRigidbody.cs @@ -73,7 +73,7 @@ namespace IsoTools { void Awake() { _fakeObject = new GameObject(); FakeGameObject.name = "_Fake" + gameObject.name; - FakeGameObject.hideFlags = HideFlags.HideInHierarchy; + //FakeGameObject.hideFlags = HideFlags.HideInHierarchy; var rigidbody = FakeGameObject.AddComponent(); rigidbody.freezeRotation = true; @@ -82,7 +82,7 @@ namespace IsoTools { rigidbody.collisionDetectionMode = CollisionMode; AddBoxCollider(); - AddHelperSpheres(); + //AddHelperSpheres(); _lastPosition = IsoObject.Position; FakeGameObject.transform.position = IsoObject.Position; diff --git a/Assets/IsoTools/Scripts/IsoUtils.cs b/Assets/IsoTools/Scripts/IsoUtils.cs index 57ba403..82831f8 100644 --- a/Assets/IsoTools/Scripts/IsoUtils.cs +++ b/Assets/IsoTools/Scripts/IsoUtils.cs @@ -4,11 +4,11 @@ using System; namespace IsoTools { public static class IsoUtils { - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // Consts // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- public static Vector3 Vec2OneX { get { return new Vector2(1.0f, 0.0f); } } public static Vector3 Vec2OneY { get { return new Vector2(0.0f, 1.0f); } } @@ -21,24 +21,22 @@ namespace IsoTools { public static Vector3 Vec3OneYZ { get { return new Vector3(0.0f, 1.0f, 1.0f); } } public static Vector3 Vec3OneXZ { get { return new Vector3(1.0f, 0.0f, 1.0f); } } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // Abs/Min/Max // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- + + // ----------------------------- + // Abs + // ----------------------------- public static Vector2 Vec2Abs(Vector2 v) { return new Vector2( Mathf.Abs(v.x), Mathf.Abs(v.y)); } - - public static Vector2 Vec2Min(Vector2 a, Vector2 b) { - return new Vector2( - Mathf.Min(a.x, b.x), - Mathf.Min(a.y, b.y)); - } - + public static Vector3 Vec3Abs(Vector3 v) { return new Vector3( Mathf.Abs(v.x), @@ -46,6 +44,24 @@ namespace IsoTools { Mathf.Abs(v.z)); } + // ----------------------------- + // Min + // ----------------------------- + + public static float Vec2MinF(Vector2 v) { + return Mathf.Min(v.x, v.y); + } + + public static float Vec3MinF(Vector3 v) { + return Mathf.Min(v.x, v.y, v.z); + } + + public static Vector2 Vec2Min(Vector2 a, Vector2 b) { + return new Vector2( + Mathf.Min(a.x, b.x), + Mathf.Min(a.y, b.y)); + } + public static Vector3 Vec3Min(Vector3 a, Vector3 b) { return new Vector3( Mathf.Min(a.x, b.x), @@ -53,6 +69,18 @@ namespace IsoTools { Mathf.Min(a.z, b.z)); } + // ----------------------------- + // Max + // ----------------------------- + + public static float Vec2MaxF(Vector2 v) { + return Mathf.Max(v.x, v.y); + } + + public static float Vec3MaxF(Vector3 v) { + return Mathf.Max(v.x, v.y, v.z); + } + public static Vector2 Vec2Max(Vector2 a, Vector2 b) { return new Vector2( Mathf.Max(a.x, b.x), @@ -66,11 +94,21 @@ namespace IsoTools { Mathf.Max(a.z, b.z)); } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // Ceil/Floor/Round // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- + + // ----------------------------- + // Ceil + // ----------------------------- + + public static Vector2 Vec2Ceil(Vector2 v) { + return new Vector2( + Mathf.Ceil(v.x), + Mathf.Ceil(v.y)); + } public static Vector3 Vec3Ceil(Vector3 v) { return new Vector3( @@ -79,6 +117,16 @@ namespace IsoTools { Mathf.Ceil(v.z)); } + // ----------------------------- + // Floor + // ----------------------------- + + public static Vector2 Vec2Floor(Vector2 v) { + return new Vector2( + Mathf.Floor(v.x), + Mathf.Floor(v.y)); + } + public static Vector3 Vec3Floor(Vector3 v) { return new Vector3( Mathf.Floor(v.x), @@ -86,6 +134,16 @@ namespace IsoTools { Mathf.Floor(v.z)); } + // ----------------------------- + // Round + // ----------------------------- + + public static Vector2 Vec2Round(Vector2 v) { + return new Vector2( + Mathf.Round(v.x), + Mathf.Round(v.y)); + } + public static Vector3 Vec3Round(Vector3 v) { return new Vector3( Mathf.Round(v.x), @@ -93,11 +151,15 @@ namespace IsoTools { Mathf.Round(v.z)); } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // Div/DivCeil/DivFloor/DivRound // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- + + // ----------------------------- + // Div + // ----------------------------- public static Vector3 Vec3Div(Vector3 a, float b) { return new Vector3( @@ -113,6 +175,10 @@ namespace IsoTools { a.z / b.z); } + // ----------------------------- + // DivCeil + // ----------------------------- + public static Vector3 Vec3DivCeil(Vector3 a, float b) { return Vec3Ceil(Vec3Div(a, b)); } @@ -120,6 +186,10 @@ namespace IsoTools { public static Vector3 Vec3DivCeil(Vector3 a, Vector3 b) { return Vec3Ceil(Vec3Div(a, b)); } + + // ----------------------------- + // DivFloor + // ----------------------------- public static Vector3 Vec3DivFloor(Vector3 a, float b) { return Vec3Floor(Vec3Div(a, b)); @@ -128,6 +198,10 @@ namespace IsoTools { public static Vector3 Vec3DivFloor(Vector3 a, Vector3 b) { return Vec3Floor(Vec3Div(a, b)); } + + // ----------------------------- + // DivRound + // ----------------------------- public static Vector3 Vec3DivRound(Vector3 a, float b) { return Vec3Round(Vec3Div(a, b)); @@ -137,11 +211,15 @@ namespace IsoTools { return Vec3Round(Vec3Div(a, b)); } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // - // FromX + // Vec2From/Vec3From // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- + + // ----------------------------- + // Vec2From + // ----------------------------- public static Vector2 Vec2FromX(float x) { return new Vector2(x, 0.0f); @@ -154,6 +232,10 @@ namespace IsoTools { public static Vector2 Vec2FromXY(float x, float y) { return new Vector2(x, y); } + + // ----------------------------- + // Vec3From + // ----------------------------- public static Vector3 Vec3FromX(float x) { return new Vector3(x, 0.0f, 0.0f); @@ -179,11 +261,15 @@ namespace IsoTools { return new Vector3(x, 0.0f, z); } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // ChangeX // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- + + // ----------------------------- + // Vec2Change + // ----------------------------- public static Vector2 Vec2ChangeX(Vector2 v, float x) { return new Vector2(x, v.y); @@ -192,6 +278,10 @@ namespace IsoTools { public static Vector2 Vec2ChangeY(Vector2 v, float y) { return new Vector2(v.x, y); } + + // ----------------------------- + // Vec3Change + // ----------------------------- public static Vector3 Vec3ChangeX(Vector3 v, float x) { return new Vector3(x, v.y, v.z); @@ -217,11 +307,11 @@ namespace IsoTools { return new Vector3(x, v.y, z); } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // Approximately // - // ----------------------------------------------------------------------- + // --------------------------------------------------------------------- public static bool Vec2Approximately(Vector2 a, Vector2 b) { return @@ -236,11 +326,18 @@ namespace IsoTools { Mathf.Approximately(a.z, b.z); } - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- // // LookUpCube // - // ------------------------------------------------------------------------ + // --------------------------------------------------------------------- + + public static void LookUpCube(Vector2 min, Vector2 max, Action act) { + for ( var y = min.y; y < max.y; ++y ) { + for ( var x = min.x; x < max.x; ++x ) { + act(new Vector2(x, y)); + }} + } public static void LookUpCube(Vector3 min, Vector3 max, Action act) { for ( var z = min.z; z < max.z; ++z ) { @@ -249,5 +346,49 @@ namespace IsoTools { act(new Vector3(x, y, z)); }}} } + + // --------------------------------------------------------------------- + // + // Debug draw + // + // --------------------------------------------------------------------- + + #if UNITY_EDITOR + static void DrawTop(Vector3 pos, Vector3 size) { + var iso_world = GameObject.FindObjectOfType(); + if ( iso_world ) { + var points = new Vector3[]{ + iso_world.IsoToScreen(pos), + iso_world.IsoToScreen(pos + IsoUtils.Vec3FromX(size.x)), + iso_world.IsoToScreen(pos + IsoUtils.Vec3FromXY(size.x, size.y)), + iso_world.IsoToScreen(pos + IsoUtils.Vec3FromY(size.y)), + iso_world.IsoToScreen(pos) + }; + Gizmos.DrawLine(points[0], points[1]); + Gizmos.DrawLine(points[1], points[2]); + Gizmos.DrawLine(points[2], points[3]); + Gizmos.DrawLine(points[3], points[0]); + } + } + + static void DrawVert(Vector3 pos, Vector3 size) { + var iso_world = GameObject.FindObjectOfType(); + if ( iso_world ) { + Gizmos.DrawLine( + iso_world.IsoToScreen(pos), + iso_world.IsoToScreen(pos + IsoUtils.Vec3FromZ(size.z))); + } + } + + public static void DrawCube(Vector3 pos, Vector3 size, Color color) { + Gizmos.color = color; + DrawTop (pos - IsoUtils.Vec3FromZ(0.5f), size); + DrawTop (pos + IsoUtils.Vec3FromZ(size.z - 0.5f), size); + DrawVert(pos - IsoUtils.Vec3FromZ(0.5f), size); + DrawVert(pos + IsoUtils.Vec3FromZ(0.5f), size); + DrawVert(pos - IsoUtils.Vec3FromZ(0.5f) + IsoUtils.Vec3FromX(size.x), size); + DrawVert(pos - IsoUtils.Vec3FromZ(0.5f) + IsoUtils.Vec3FromY(size.y), size); + } + #endif } } \ No newline at end of file diff --git a/Assets/IsoTools/Scripts/IsoWorld.cs b/Assets/IsoTools/Scripts/IsoWorld.cs index 63ddacd..f7e295c 100644 --- a/Assets/IsoTools/Scripts/IsoWorld.cs +++ b/Assets/IsoTools/Scripts/IsoWorld.cs @@ -39,18 +39,19 @@ namespace IsoTools { public List Objects = new List(); } - bool _dirty = true; - float _lastTileSize = 0.0f; - float _lastMinDepth = 0.0f; - float _lastMaxDepth = 0.0f; + bool _dirty = true; + float _lastTileSize = 0.0f; + float _lastMinDepth = 0.0f; + float _lastMaxDepth = 0.0f; - List _sectors = new List(); - List _objects = new List(); - List _depends = new List(); - float _objsSectorSize = 0.0f; - Vector3 _objsMinNumPos = Vector3.zero; - Vector3 _objsMaxNumPos = Vector3.zero; - Vector3 _objsNumPosCount = Vector3.zero; + List _sectors = new List(); + List _objects = new List(); + List _depends = new List(); + HashSet _visibles = new HashSet(); + float _objsSectorSize = 0.0f; + Vector3 _objsMinNumPos = Vector3.zero; + Vector3 _objsMaxNumPos = Vector3.zero; + Vector3 _objsNumPosCount = Vector3.zero; [SerializeField] public float _tileSize = 32.0f; @@ -263,31 +264,36 @@ namespace IsoTools { return a_yesno; } - void SetupSectorSize(IsoObject[] iso_objects) { + void SetupVisibles(IsoObject[] iso_objects) { + var new_visibles = new HashSet( + iso_objects.Where(p => IsIsoObjectVisible(p))); + if ( !_visibles.IsSupersetOf(new_visibles) ) { + MarkDirty(); + } + _visibles = new_visibles; + } + + void SetupSectorSize() { _objsSectorSize = 0.0f; var objsSum = 0; - foreach ( var obj in iso_objects ) { - if ( IsIsoObjectVisible(obj) ) { - ++objsSum; - _objsSectorSize += Mathf.Max(obj.Size.x, obj.Size.y, obj.Size.z); - } + foreach ( var obj in _visibles ) { + ++objsSum; + _objsSectorSize += Mathf.Max(obj.Size.x, obj.Size.y, obj.Size.z); } _objsSectorSize = Mathf.Round(Mathf.Max(3.0f, _objsSectorSize / objsSum)); } - void SetupObjects(IsoObject[] iso_objects) { + void SetupObjects() { _objects.Clear(); _objsMinNumPos = Vector3.zero; _objsMaxNumPos = Vector3.one; - foreach ( var obj in iso_objects ) { - if ( IsIsoObjectVisible(obj) ) { - var max_size = IsoUtils.Vec3Max(Vector3.one, obj.Size); - var min_npos = IsoUtils.Vec3DivFloor(obj.Position, _objsSectorSize); - var max_npos = IsoUtils.Vec3DivCeil(obj.Position + max_size, _objsSectorSize); - _objsMinNumPos = IsoUtils.Vec3Min(_objsMinNumPos, min_npos); - _objsMaxNumPos = IsoUtils.Vec3Max(_objsMaxNumPos, max_npos); - _objects.Add(new ObjectInfo(_objects.Count, obj, min_npos, max_npos)); - } + foreach ( var obj in _visibles ) { + var max_size = IsoUtils.Vec3Max(Vector3.one, obj.Size); + var min_npos = IsoUtils.Vec3DivFloor(obj.Position, _objsSectorSize); + var max_npos = IsoUtils.Vec3DivCeil(obj.Position + max_size, _objsSectorSize); + _objsMinNumPos = IsoUtils.Vec3Min(_objsMinNumPos, min_npos); + _objsMaxNumPos = IsoUtils.Vec3Max(_objsMaxNumPos, max_npos); + _objects.Add(new ObjectInfo(_objects.Count, obj, min_npos, max_npos)); } _objsNumPosCount = _objsMaxNumPos - _objsMinNumPos; } @@ -359,10 +365,11 @@ namespace IsoTools { } void StepSort() { + var iso_objects = GameObject.FindObjectsOfType(); + SetupVisibles(iso_objects); if ( _dirty ) { - var iso_objects = GameObject.FindObjectsOfType(); - SetupSectorSize(iso_objects); - SetupObjects(iso_objects); + SetupSectorSize(); + SetupObjects(); SetupSectors(); SetupObjectDepends(); PlaceAllObjects(); diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 5b5d2fa..477e275 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -208,6 +208,7 @@ PlayerSettings: psp2NPTrophyPackPath: psp2NPSupportGBMorGJP: 0 psp2NPAgeRating: 12 + psp2NPTitleDatPath: psp2NPCommsID: psp2NPCommunicationsID: psp2NPCommsPassphrase: @@ -222,6 +223,7 @@ PlayerSettings: psp2PatchOriginalPackage: psp2PackagePassword: psp2KeystoneFile: + psp2MemoryExpansionMode: 0 psp2DRMType: 0 psp2StorageType: 0 psp2MediaCapacity: 0 @@ -357,6 +359,7 @@ PlayerSettings: XboxOnePackagingOverridePath: XboxOneAppManifestOverridePath: XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 XboxOneDescription: XboxOneIsContentPackage: 0 XboxOneEnableGPUVariability: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index de77f25..802c8ce 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 5.0.1f1 +m_EditorVersion: 5.0.2f1 m_StandardAssetsVersion: 0 diff --git a/UnityIso-csharp.sln b/UnityIso-csharp.sln index 502f8d7..0ea0974 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 bd97145..e976284 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 331445f..72ff426 100644 --- a/UnityIso.userprefs +++ b/UnityIso.userprefs @@ -1,9 +1,11 @@  - - + + - - + + + +