Box selection improvements

This commit is contained in:
Braedon 2022-01-16 14:23:46 -05:00
parent c48f2064f0
commit 86e203be5e
7 changed files with 561 additions and 39 deletions

View file

@ -665,6 +665,81 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 156962253}
m_CullTransparentMesh: 1
--- !u!1 &163092848
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 163092849}
- component: {fileID: 163092851}
- component: {fileID: 163092850}
m_Layer: 5
m_Name: 2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &163092849
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 163092848}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1231936949}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0.04, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &163092850
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 163092848}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.2}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &163092851
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 163092848}
m_CullTransparentMesh: 1
--- !u!1 &191459085
GameObject:
m_ObjectHideFlags: 0
@ -1508,16 +1583,17 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 411779173}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1556269007}
m_RootOrder: 0
m_LocalScale: {x: 0.7199426, y: 71.99426, z: 71.99426}
m_Children:
- {fileID: 1310571274}
m_Father: {fileID: 1852819573}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: -155.8399, y: 152.75832}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &411779175
@ -3592,6 +3668,8 @@ RectTransform:
- {fileID: 660967737}
- {fileID: 820032005}
- {fileID: 258006092}
- {fileID: 2127582757}
- {fileID: 1231936949}
m_Father: {fileID: 1838356727}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -5490,6 +5568,129 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7e029fba1da3e5d4292b2d0e67333487, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1231936948
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1231936949}
- component: {fileID: 1231936951}
m_Layer: 5
m_Name: Outline
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1231936949
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1231936948}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1953621882}
- {fileID: 163092849}
- {fileID: 1237250188}
- {fileID: 1837496588}
m_Father: {fileID: 798021449}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &1231936951
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1231936948}
m_CullTransparentMesh: 1
--- !u!1 &1237250187
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1237250188}
- component: {fileID: 1237250190}
- component: {fileID: 1237250189}
m_Layer: 5
m_Name: 3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1237250188
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237250187}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1231936949}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.04, y: 0}
m_SizeDelta: {x: -0.08, y: 4}
m_Pivot: {x: 1, y: 1}
--- !u!114 &1237250189
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237250187}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.2}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1237250190
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237250187}
m_CullTransparentMesh: 1
--- !u!1 &1264012261
GameObject:
m_ObjectHideFlags: 0
@ -5806,6 +6007,81 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1277418759}
m_CullTransparentMesh: 1
--- !u!1 &1310571273
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1310571274}
- component: {fileID: 1310571276}
- component: {fileID: 1310571275}
m_Layer: 5
m_Name: Outline
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1310571274
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1310571273}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 411779174}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1310571275
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1310571273}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: f9232c079e126cd48a7344b23eaf42a5, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 60
--- !u!222 &1310571276
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1310571273}
m_CullTransparentMesh: 1
--- !u!1 &1342998171
GameObject:
m_ObjectHideFlags: 0
@ -6647,7 +6923,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
m_PresetInfoIsWorld: 1
--- !u!223 &1556269006
Canvas:
m_ObjectHideFlags: 0
@ -6657,7 +6933,7 @@ Canvas:
m_GameObject: {fileID: 1556269003}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_RenderMode: 2
m_Camera: {fileID: 2047408675}
m_PlaneDistance: 100
m_PixelPerfect: 1
@ -6678,17 +6954,16 @@ RectTransform:
m_GameObject: {fileID: 1556269003}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 411779174}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
m_SizeDelta: {x: 1280, y: 720}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1567318395
GameObject:
m_ObjectHideFlags: 0
@ -7765,6 +8040,81 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1280, y: 720}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1837496587
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1837496588}
- component: {fileID: 1837496590}
- component: {fileID: 1837496589}
m_Layer: 5
m_Name: 4
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1837496588
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1837496587}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1231936949}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -0.04, y: 0}
m_SizeDelta: {x: -0.08, y: 4}
m_Pivot: {x: 1, y: 0}
--- !u!114 &1837496589
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1837496587}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.2}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1837496590
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1837496587}
m_CullTransparentMesh: 1
--- !u!1 &1838356726
GameObject:
m_ObjectHideFlags: 0
@ -7836,6 +8186,7 @@ RectTransform:
- {fileID: 1747224096}
- {fileID: 580861938}
- {fileID: 1838356727}
- {fileID: 411779174}
m_Father: {fileID: 547319783}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -8367,6 +8718,81 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1928361018}
m_CullTransparentMesh: 1
--- !u!1 &1953621881
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1953621882}
- component: {fileID: 1953621884}
- component: {fileID: 1953621883}
m_Layer: 5
m_Name: 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1953621882
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1953621881}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1231936949}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0.04, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1953621883
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1953621881}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.2}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1953621884
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1953621881}
m_CullTransparentMesh: 1
--- !u!1 &1964271230
GameObject:
m_ObjectHideFlags: 0
@ -8753,6 +9179,81 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2127582756
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2127582757}
- component: {fileID: 2127582759}
- component: {fileID: 2127582758}
m_Layer: 5
m_Name: SelectedGraphic
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &2127582757
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2127582756}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 798021449}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2127582758
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2127582756}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.2901961}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &2127582759
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2127582756}
m_CullTransparentMesh: 1
--- !u!1 &2142375786
GameObject:
m_ObjectHideFlags: 0

View file

@ -93,7 +93,7 @@ namespace RhythmHeavenMania
if (currentEvent < Beatmap.entities.Count && currentEvent >= 0)
{
if (Conductor.instance.songPositionInBeats >= entities[currentEvent] && SongPosLessThanClipLength(Conductor.instance.songPositionInBeats))
if (Conductor.instance.songPositionInBeats >= entities[currentEvent] /*&& SongPosLessThanClipLength(Conductor.instance.songPositionInBeats)*/)
{
// allows for multiple events on the same beat to be executed on the same frame, so no more 1-frame delay
var entitesAtSameBeat = Beatmap.entities.FindAll(c => c.beat == Beatmap.entities[currentEvent].beat && c.datamodel.Split('/')[0] != "gameManager");

View file

@ -30,6 +30,7 @@ namespace RhythmHeavenMania.Editor
Color boxCol = EditorTheme.theme.properties.BoxSelectionCol.Hex2RGB();
boxVisual.GetComponent<Image>().color = new Color(boxCol.r, boxCol.g, boxCol.b, 0.3f);
boxVisual.transform.GetChild(0).GetComponent<Image>().color = EditorTheme.theme.properties.BoxSelectionOutlineCol.Hex2RGB();
}
private void Update()
@ -42,14 +43,14 @@ namespace RhythmHeavenMania.Editor
// click
if (Input.GetMouseButtonDown(0))
{
startPosition = Input.mousePosition;
startPosition = MousePosition();
selectionBox = new Rect();
}
// dragging
if (Input.GetMouseButton(0))
{
endPosition = Input.mousePosition;
endPosition = MousePosition();
DrawVisual();
DrawSelection();
}
@ -57,7 +58,6 @@ namespace RhythmHeavenMania.Editor
// release click
if (Input.GetMouseButtonUp(0))
{
startPosition = Vector2.zero;
endPosition = Vector2.zero;
DrawVisual();
@ -85,31 +85,31 @@ namespace RhythmHeavenMania.Editor
private void DrawSelection()
{
// X
if (Input.mousePosition.x < startPosition.x)
if (MousePosition().x < startPosition.x)
{
// dragging left
selectionBox.xMin = Input.mousePosition.x;
selectionBox.xMin = MousePosition().x;
selectionBox.xMax = startPosition.x;
}
else
{
// dragging right
selectionBox.xMin = startPosition.x;
selectionBox.xMax = Input.mousePosition.x;
selectionBox.xMax = MousePosition().x;
}
// Y
if (Input.mousePosition.y < startPosition.y)
if (MousePosition().y < startPosition.y)
{
// dragging down
selectionBox.yMin = Input.mousePosition.y;
selectionBox.yMin = MousePosition().y;
selectionBox.yMax = startPosition.y;
}
else
{
// dragging up
selectionBox.yMin = startPosition.y;
selectionBox.yMax = Input.mousePosition.y;
selectionBox.yMax = MousePosition().y;
}
}
@ -120,30 +120,37 @@ namespace RhythmHeavenMania.Editor
for (int i = 0; i < GameManager.instance.Beatmap.entities.Count; i++)
{
TimelineEventObj e = GameManager.instance.Beatmap.entities[i].eventObj;
if (selectionBox.Contains(Camera.main.WorldToScreenPoint(e.transform.position)))
if (selectionBox.Overlaps(GetWorldRect(e.GetComponent<RectTransform>())))
{
print(selectionBox);
print(GetWorldRect(e.GetComponent<RectTransform>()));
Selections.instance.DragSelect(e);
selected++;
}
// I'm trying this fix this dammit
/*if (selectionBox.Overlaps(RectTransformToScreenSpace(e.GetComponent<RectTransform>())))
{
print(RectTransformToScreenSpace(e.GetComponent<RectTransform>()));
print(selectionBox);
Selections.instance.DragSelect(e);
selected++;
}*/
}
selecting = selected > 0;
}
public Rect RectTransformToScreenSpace(RectTransform transform)
public Vector3 MousePosition()
{
Vector2 sizeTemp = Vector2.Scale(transform.rect.size, transform.localScale);
Vector2 size = new Vector2(sizeTemp.x * 100, sizeTemp.y);
return new Rect((Vector2)Camera.main.WorldToScreenPoint(transform.position) - (size * 0.5f), size);
var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
return new Vector3(mousePos.x, mousePos.y, 0);
}
public Rect GetWorldRect(RectTransform rectTransform)
{
Vector3[] corners = new Vector3[4];
rectTransform.GetWorldCorners(corners);
// Get the bottom left corner.
Vector3 position = corners[0];
Vector2 size = new Vector2(
rectTransform.lossyScale.x * rectTransform.rect.size.x,
rectTransform.lossyScale.y * rectTransform.rect.size.y);
return new Rect(position, size);
}
}
}

View file

@ -27,6 +27,7 @@ namespace RhythmHeavenMania.Editor
public string CurrentTimeMarkerCol;
public string BoxSelectionCol;
public string BoxSelectionOutlineCol;
}
}
}

View file

@ -63,6 +63,18 @@ namespace RhythmHeavenMania.Editor
Selections.instance.Deselect(this);
Timeline.instance.DestroyEventObject(entity);
}
transform.GetChild(3).gameObject.SetActive(true);
for (int i = 0; i < transform.GetChild(4).childCount; i++)
transform.GetChild(4).GetChild(i).GetComponent<Image>().color = Color.cyan;
}
else
{
transform.GetChild(3).gameObject.SetActive(false);
for (int i = 0; i < transform.GetChild(4).childCount; i++)
transform.GetChild(4).GetChild(i).GetComponent<Image>().color = new Color32(0, 0, 0, 51);
}
if (Conductor.instance.NotStopped())

View file

@ -19,6 +19,7 @@
"BeatMarkerCol": "ffbc36",
"CurrentTimeMarkerCol": "ffc95c",
"BoxSelectionCol": "ffd175"
"BoxSelectionCol": "61e5ff",
"BoxSelectionOutlineCol": "61e5ff"
}
}

View file

@ -1 +1 @@
{"bpm":120.0,"entities":[{"beat":0.0,"track":1,"datamodel":"clappyTrio/bop"},{"beat":1.0,"track":2,"datamodel":"clappyTrio/bop"},{"beat":2.0,"track":0,"datamodel":"clappyTrio/bop"},{"beat":3.0,"track":0,"datamodel":"clappyTrio/prepare"},{"beat":4.0,"track":3,"length":1.0,"datamodel":"clappyTrio/clap"},{"beat":7.75,"track":0,"datamodel":"gameManager/switchGame/karateman"},{"beat":8.0,"track":3,"datamodel":"karateman/bop"},{"beat":9.0,"track":1,"datamodel":"karateman/bop"},{"beat":10.0,"track":1,"datamodel":"karateman/pot"},{"beat":10.0,"track":1,"datamodel":"karateman/bop"},{"beat":12.0,"track":1,"datamodel":"karateman/bop"},{"beat":13.0,"track":3,"datamodel":"karateman/rock"},{"beat":15.75,"track":1,"datamodel":"gameManager/switchGame/clappyTrio"},{"beat":16.0,"track":0,"datamodel":"clappyTrio/bop"},{"beat":17.0,"track":3,"datamodel":"clappyTrio/bop"},{"beat":18.0,"track":1,"datamodel":"clappyTrio/bop"},{"beat":19.0,"track":3,"datamodel":"clappyTrio/bop"},{"beat":20.0,"track":3,"datamodel":"clappyTrio/prepare"},{"beat":21.0,"track":2,"length":0.5,"datamodel":"clappyTrio/clap"},{"beat":23.0,"track":0,"datamodel":"clappyTrio/bop"},{"beat":23.75,"track":2,"datamodel":"gameManager/switchGame/spaceball"},{"beat":24.0,"track":1,"datamodel":"spaceball/shoot"},{"beat":24.0,"track":2,"length":4.0,"valA":20.0,"datamodel":"spaceball/cameraZoom"},{"beat":26.0,"track":3,"datamodel":"spaceball/shoot"},{"beat":28.0,"track":0,"length":2.0,"valA":120.0,"datamodel":"spaceball/cameraZoom"},{"beat":28.0,"track":2,"datamodel":"spaceball/shootHigh"},{"beat":31.75,"track":3,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":32.0,"track":0,"datamodel":"forkLifter/pea"},{"beat":36.0,"track":0,"datamodel":"forkLifter/pea"},{"beat":39.0,"track":0,"datamodel":"forkLifter/gulp"},{"beat":40.0,"track":0,"datamodel":"karateman/bop"},{"beat":40.0,"track":2,"datamodel":"karateman/bgfxon"},{"beat":40.0,"track":3,"datamodel":"gameManager/switchGame/karateman"},{"beat":41.0,"track":1,"datamodel":"karateman/bop"},{"beat":42.0,"track":2,"datamodel":"karateman/pot"},{"beat":42.0,"track":1,"datamodel":"karateman/bop"},{"beat":44.0,"track":1,"datamodel":"karateman/bulb"},{"beat":44.0,"track":0,"datamodel":"karateman/bop"},{"beat":46.0,"track":1,"datamodel":"karateman/ball"},{"beat":46.0,"track":3,"datamodel":"karateman/bop"},{"beat":48.0,"track":3,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":49.0,"track":2,"datamodel":"forkLifter/pea"},{"beat":52.0,"track":2,"datamodel":"forkLifter/pea"},{"beat":56.0,"track":2,"datamodel":"karateman/bgfxon"},{"beat":56.0,"track":1,"datamodel":"karateman/kick"},{"beat":56.0,"track":3,"datamodel":"gameManager/switchGame/karateman"},{"beat":58.0,"track":0,"datamodel":"karateman/pot"},{"beat":60.0,"track":0,"datamodel":"karateman/pot"},{"beat":62.0,"track":2,"datamodel":"karateman/rock"},{"beat":64.0,"track":1,"datamodel":"gameManager/switchGame/spaceball"},{"beat":64.0,"track":3,"datamodel":"spaceball/shootHigh"},{"beat":68.0,"track":3,"datamodel":"spaceball/shootHigh"},{"beat":71.75,"track":3,"datamodel":"gameManager/switchGame/karateman"},{"beat":71.75,"track":3,"datamodel":"karateman/bgfxon"},{"beat":73.5,"track":2,"datamodel":"karateman/pot"},{"beat":74.0,"track":1,"datamodel":"karateman/pot"},{"beat":77.0,"track":1,"datamodel":"karateman/pot"},{"beat":79.0,"track":3,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":80.0,"track":3,"datamodel":"gameManager/switchGame/spaceball"},{"beat":80.0,"track":3,"datamodel":"spaceball/shoot"},{"beat":84.0,"track":3,"datamodel":"forkLifter/pea"},{"beat":84.0,"track":3,"datamodel":"spaceball/shootHigh"},{"beat":85.75,"track":1,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":87.0,"track":1,"datamodel":"karateman/bgfxon"},{"beat":87.0,"track":0,"datamodel":"gameManager/switchGame/karateman"},{"beat":88.0,"track":2,"datamodel":"karateman/pot"},{"beat":88.5,"track":1,"datamodel":"karateman/pot"},{"beat":90.0,"track":0,"datamodel":"karateman/pot"},{"beat":92.0,"track":1,"datamodel":"karateman/bulb"},{"beat":94.0,"track":2,"datamodel":"karateman/kick"},{"beat":95.75,"track":0,"datamodel":"karateman/bgfxoff"}]}
{"bpm":120.0,"entities":[{"beat":0.0,"track":3,"datamodel":"clappyTrio/bop"},{"beat":1.0,"track":1,"datamodel":"clappyTrio/bop"},{"beat":2.0,"track":3,"datamodel":"clappyTrio/bop"},{"beat":3.0,"track":2,"datamodel":"clappyTrio/prepare"},{"beat":4.0,"track":0,"length":1.0,"datamodel":"clappyTrio/clap"},{"beat":7.75,"track":3,"datamodel":"gameManager/switchGame/karateman"},{"beat":8.0,"track":1,"datamodel":"karateman/bop"},{"beat":9.0,"track":0,"datamodel":"karateman/bop"},{"beat":10.0,"track":3,"datamodel":"karateman/pot"},{"beat":10.0,"track":2,"datamodel":"karateman/bop"},{"beat":12.0,"track":1,"datamodel":"karateman/bop"},{"beat":13.0,"track":1,"datamodel":"karateman/rock"},{"beat":15.75,"track":2,"datamodel":"gameManager/switchGame/clappyTrio"},{"beat":16.0,"track":0,"datamodel":"clappyTrio/bop"},{"beat":17.0,"track":1,"datamodel":"clappyTrio/bop"},{"beat":18.0,"track":0,"datamodel":"clappyTrio/bop"},{"beat":19.0,"track":3,"datamodel":"clappyTrio/bop"},{"beat":20.0,"track":1,"datamodel":"clappyTrio/prepare_alt"},{"beat":21.0,"track":0,"length":0.5,"datamodel":"clappyTrio/clap"},{"beat":23.0,"track":3,"datamodel":"clappyTrio/bop"},{"beat":23.75,"track":1,"datamodel":"gameManager/switchGame/spaceball"},{"beat":24.0,"track":0,"datamodel":"spaceball/shoot"},{"beat":24.0,"track":0,"length":4.0,"valA":20.0,"datamodel":"spaceball/cameraZoom"},{"beat":26.0,"track":1,"datamodel":"spaceball/shoot"},{"beat":28.0,"track":0,"length":2.0,"valA":120.0,"datamodel":"spaceball/cameraZoom"},{"beat":28.0,"track":2,"datamodel":"spaceball/shootHigh"},{"beat":31.75,"track":2,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":32.0,"track":3,"datamodel":"forkLifter/pea"},{"beat":36.0,"track":2,"datamodel":"forkLifter/pea"},{"beat":39.0,"track":3,"datamodel":"forkLifter/gulp"},{"beat":40.0,"track":1,"datamodel":"karateman/bop"},{"beat":40.0,"track":0,"datamodel":"karateman/bgfxon"},{"beat":40.0,"track":1,"datamodel":"gameManager/switchGame/karateman"},{"beat":41.0,"track":3,"datamodel":"karateman/bop"},{"beat":42.0,"track":0,"datamodel":"karateman/pot"},{"beat":42.0,"track":3,"datamodel":"karateman/bop"},{"beat":44.0,"track":3,"datamodel":"karateman/bop"},{"beat":44.0,"track":1,"datamodel":"karateman/bulb"},{"beat":46.0,"track":0,"datamodel":"karateman/ball"},{"beat":46.0,"track":0,"datamodel":"karateman/bop"},{"beat":48.0,"track":0,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":49.0,"track":1,"datamodel":"forkLifter/pea"},{"beat":52.0,"track":2,"datamodel":"forkLifter/pea"},{"beat":56.0,"track":0,"datamodel":"karateman/bgfxon"},{"beat":56.0,"track":3,"datamodel":"karateman/kick"},{"beat":56.0,"track":3,"datamodel":"gameManager/switchGame/karateman"},{"beat":58.0,"track":2,"datamodel":"karateman/pot"},{"beat":60.0,"track":1,"datamodel":"karateman/pot"},{"beat":62.0,"track":3,"datamodel":"karateman/rock"},{"beat":64.0,"track":3,"datamodel":"gameManager/switchGame/spaceball"},{"beat":64.0,"track":1,"datamodel":"spaceball/shootHigh"},{"beat":68.0,"track":2,"datamodel":"spaceball/shootHigh"},{"beat":71.75,"track":3,"datamodel":"gameManager/switchGame/karateman"},{"beat":71.75,"track":1,"datamodel":"karateman/bgfxon"},{"beat":73.5,"track":1,"datamodel":"karateman/pot"},{"beat":74.0,"track":0,"datamodel":"karateman/pot"},{"beat":77.0,"track":3,"datamodel":"karateman/pot"},{"beat":79.0,"track":0,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":80.0,"track":1,"datamodel":"gameManager/switchGame/spaceball"},{"beat":80.0,"track":0,"datamodel":"spaceball/shoot"},{"beat":84.0,"track":3,"datamodel":"forkLifter/pea"},{"beat":84.0,"track":0,"datamodel":"spaceball/shootHigh"},{"beat":85.75,"track":1,"datamodel":"gameManager/switchGame/forkLifter"},{"beat":87.0,"track":3,"datamodel":"karateman/bgfxon"},{"beat":87.0,"track":1,"datamodel":"gameManager/switchGame/karateman"},{"beat":88.0,"track":0,"datamodel":"karateman/pot"},{"beat":88.5,"track":2,"datamodel":"karateman/pot"},{"beat":90.0,"track":3,"datamodel":"karateman/pot"},{"beat":92.0,"track":0,"datamodel":"karateman/bulb"},{"beat":94.0,"track":2,"datamodel":"karateman/kick"},{"beat":95.75,"track":3,"datamodel":"karateman/bgfxoff"}]}