From 056371ad8b573893022ff9ac991561337156bbb8 Mon Sep 17 00:00:00 2001 From: Cedrok Date: Wed, 24 Jul 2024 11:25:35 +0200 Subject: [PATCH 1/8] Create breakers in front top left corner of racks --- Assets/Prefabs/Breaker.prefab | 295 ++++++++++++++++++++++++++++ Assets/Prefabs/Breaker.prefab.meta | 7 + Assets/Scenes/Main.unity | 7 +- Assets/Scripts/GameManager.cs | 1 + Assets/Scripts/OgreeClasses/Rack.cs | 54 ++++- 5 files changed, 361 insertions(+), 3 deletions(-) create mode 100644 Assets/Prefabs/Breaker.prefab create mode 100644 Assets/Prefabs/Breaker.prefab.meta diff --git a/Assets/Prefabs/Breaker.prefab b/Assets/Prefabs/Breaker.prefab new file mode 100644 index 00000000..eeaa970c --- /dev/null +++ b/Assets/Prefabs/Breaker.prefab @@ -0,0 +1,295 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4254767957273672101 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4176928236324298618} + - component: {fileID: 2756453064248392137} + - component: {fileID: 2633159542549976067} + - component: {fileID: 280631025753518186} + m_Layer: 0 + m_Name: Cube + m_TagString: Selectable + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4176928236324298618 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4254767957273672101} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.08, y: 0.026, z: 0.018} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8422964209624112029} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &2756453064248392137 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4254767957273672101} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &2633159542549976067 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4254767957273672101} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0142c1713e441b04ca9b28bdda0528b1, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &280631025753518186 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4254767957273672101} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &6010235731161253863 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8422964209624112029} + - component: {fileID: 226685182499933010} + - component: {fileID: 530606338633814678} + - component: {fileID: 7641173002511634591} + - component: {fileID: 8887383438007595577} + - component: {fileID: 4357075341803950509} + m_Layer: 0 + m_Name: Breaker + m_TagString: Selectable + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8422964209624112029 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6010235731161253863} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4176928236324298618} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &226685182499933010 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6010235731161253863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b42dd2f19759194496c13696d98ac2a, type: 3} + m_Name: + m_EditorClassIdentifier: + labelFront: {fileID: 0} + labelRear: {fileID: 0} + labelTop: {fileID: 0} + labelBottom: {fileID: 0} + labelLeft: {fileID: 0} + labelRight: {fileID: 0} + floatingLabel: {fileID: 0} + hasFloatingLabel: 0 + usedLabels: [] + attrToDisplay: +--- !u!205 &530606338633814678 +LODGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6010235731161253863} + serializedVersion: 2 + m_LocalReferencePoint: {x: 0, y: 0, z: 0} + m_Size: 1 + m_FadeMode: 0 + m_AnimateCrossFading: 0 + m_LastLODIsBillboard: 0 + m_LODs: + - screenRelativeHeight: 0.10489535 + fadeTransitionWidth: 0 + renderers: + - renderer: {fileID: 0} + - renderer: {fileID: 0} + - renderer: {fileID: 0} + - renderer: {fileID: 0} + - renderer: {fileID: 0} + - renderer: {fileID: 0} + m_Enabled: 1 +--- !u!54 &7641173002511634591 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6010235731161253863} + serializedVersion: 4 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &8887383438007595577 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6010235731161253863} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 33607cab658c03648afda9bfe3118223, type: 3} + m_Name: + m_EditorClassIdentifier: + name: + id: + parentId: + category: Breaker + description: + domain: + tags: [] + currentLod: 0 + originalLocalPosition: {x: -Infinity, y: -Infinity, z: -Infinity} + originalLocalRotation: {x: 0, y: 0, z: 0, w: 1} + originalLocalScale: {x: 1, y: 1, z: 1} + heatMap: {fileID: 0} + scatterPlot: 0 + localCS: {fileID: 0} + isDoomed: 0 + isLodLocked: 0 + color: {r: 0, g: 0, b: 0, a: 0} + referent: {fileID: 0} + tempBar: {fileID: 0} + temperatureUnit: + hasSlotColor: 0 + group: {fileID: 0} + clearanceHandler: + front: + length: 0 + direction: {x: 0, y: 0, z: 0} + rear: + length: 0 + direction: {x: 0, y: 0, z: 0} + left: + length: 0 + direction: {x: 0, y: 0, z: 0} + right: + length: 0 + direction: {x: 0, y: 0, z: 0} + top: + length: 0 + direction: {x: 0, y: 0, z: 0} + bottom: + length: 0 + direction: {x: 0, y: 0, z: 0} + clearedObject: {fileID: 0} + isToggled: 0 + isInitialized: 0 + clearanceWrapper: {fileID: 0} + clearances: [] + isComponent: 1 + primarySlot: {fileID: 0} + takenSlots: [] +--- !u!114 &4357075341803950509 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6010235731161253863} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 11599482bb3741f4b890d546eeba923f, type: 3} + m_Name: + m_EditorClassIdentifier: + isTemplate: 0 + scatterPlotOfOneParent: 0 + isHidden: 0 + isHiddenInGroup: 0 + isHighlighted: 0 diff --git a/Assets/Prefabs/Breaker.prefab.meta b/Assets/Prefabs/Breaker.prefab.meta new file mode 100644 index 00000000..42e7d17f --- /dev/null +++ b/Assets/Prefabs/Breaker.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ebc81c5329e56b244b02e7d4885acad9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 7faa6dc5..5b4eddb8 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -9949,9 +9949,9 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Build date: 2024-06-28 + m_text: 'Build date: 2024-07-24 - Commit #96a72e3' + Commit #207ecf9' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2} @@ -19470,6 +19470,7 @@ MonoBehaviour: uRoot: {fileID: 0} gridForULocation: {fileID: 0} areUHelpersToggled: 0 + breakersBoxes: [] --- !u!1 &1585158489 GameObject: m_ObjectHideFlags: 0 @@ -19749,6 +19750,8 @@ MonoBehaviour: type: 3} highlightCubeModel: {fileID: 8173383261354772020, guid: 386c434238619d14081f4b2b8821aae3, type: 3} + breakerModel: {fileID: 6010235731161253863, guid: ebc81c5329e56b244b02e7d4885acad9, + type: 3} genericCubeModel: {fileID: 6010235731161253863, guid: b617279059cb07f4b9a7b2b0749e8cf4, type: 3} genericSphereModel: {fileID: 6010235731161253863, guid: d41ea6b58bdaa674cbb27cb2ba577488, diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 80be2c3d..97442208 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -49,6 +49,7 @@ public class GameManager : MonoBehaviour public GameObject floatingLabelModel; public GameObject clearanceModel; public GameObject highlightCubeModel; + public GameObject breakerModel; public GameObject genericCubeModel; public GameObject genericSphereModel; public GameObject genericCylinderModel; diff --git a/Assets/Scripts/OgreeClasses/Rack.cs b/Assets/Scripts/OgreeClasses/Rack.cs index 79fe3853..14e0fcfe 100644 --- a/Assets/Scripts/OgreeClasses/Rack.cs +++ b/Assets/Scripts/OgreeClasses/Rack.cs @@ -1,10 +1,13 @@ -using UnityEngine; +using System.Collections.Generic; +using Newtonsoft.Json.Linq; +using UnityEngine; public class Rack : Item { public Transform uRoot; public GameObject gridForULocation; public bool areUHelpersToggled = false; + public List breakersBoxes = new(); public override void UpdateFromSApiObject(SApiObject _src) { @@ -23,6 +26,55 @@ public override void UpdateFromSApiObject(SApiObject _src) if (HasAttributeChanged(_src, "color")) SetColor((string)_src.attributes["color"]); + if (HasAttributeChanged(_src, "breakers")) + GenerateBreakersBoxes(_src); + base.UpdateFromSApiObject(_src); } + + /// + /// Cast breakers dictionary and fill + /// + /// New data of the rack + private void GenerateBreakersBoxes(SApiObject _src) + { + Dictionary> breakers = ((JObject)_src.attributes["breakers"]).ToObject>>(); + int i = 0; + foreach (var breaker in breakers) + breakersBoxes.Add(CreateBreakerBox(_src, i++, breaker.Key, breaker.Value)); + } + + /// + /// Create a breakerBox and place it at the top left corner of this rack + /// + /// New data of the rack + /// Index of the breaker to create, used for placement + /// Name of the breaker to create + /// Attributes of the breaker to create + /// + private GameObject CreateBreakerBox(SApiObject _src, int _index, string _name, Dictionary _attrs) + { + Debug.Log($"{_index}: {_name}"); + Vector3 parentSize = transform.GetChild(0).localScale; + + GameObject newBreaker = Instantiate(GameManager.instance.breakerModel, transform); + newBreaker.name = $"breaker_{_name}"; + + Vector3 shapeSize = newBreaker.transform.GetChild(0).localScale; + newBreaker.transform.localPosition = new(parentSize.x - shapeSize.x, parentSize.y - shapeSize.y / 2, parentSize.z); + newBreaker.transform.localPosition += _index * (shapeSize.y + 0.005f) * Vector3.down; + + Device breakerOO = newBreaker.GetComponent(); + breakerOO.name = _name; + breakerOO.id = $"{_src.id}.{_name}"; + breakerOO.parentId = _src.id; + breakerOO.attributes = _attrs; + + DisplayObjectData breakerDoD = newBreaker.GetComponent(); + breakerDoD.PlaceTexts(LabelPos.Front); + breakerDoD.SetLabel(breakerOO.name); + breakerDoD.SwitchLabel(ELabelMode.Default); + + return newBreaker; + } } From acafe7932e91d6ca6d62d2741db291fe9565ff68 Mon Sep 17 00:00:00 2001 From: Cedrok Date: Wed, 24 Jul 2024 12:03:02 +0200 Subject: [PATCH 2/8] fix Breakers creation --- Assets/Scripts/OgreeClasses/Rack.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/OgreeClasses/Rack.cs b/Assets/Scripts/OgreeClasses/Rack.cs index 14e0fcfe..23139a20 100644 --- a/Assets/Scripts/OgreeClasses/Rack.cs +++ b/Assets/Scripts/OgreeClasses/Rack.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Newtonsoft.Json.Linq; using UnityEngine; @@ -38,10 +38,14 @@ public override void UpdateFromSApiObject(SApiObject _src) /// New data of the rack private void GenerateBreakersBoxes(SApiObject _src) { + for (int i = 0; i < breakersBoxes.Count; i++) + Destroy(breakersBoxes[i]); + breakersBoxes.Clear(); + Dictionary> breakers = ((JObject)_src.attributes["breakers"]).ToObject>>(); - int i = 0; + int index = 0; foreach (var breaker in breakers) - breakersBoxes.Add(CreateBreakerBox(_src, i++, breaker.Key, breaker.Value)); + breakersBoxes.Add(CreateBreakerBox(_src, index++, breaker.Key, breaker.Value)); } /// @@ -51,7 +55,7 @@ private void GenerateBreakersBoxes(SApiObject _src) /// Index of the breaker to create, used for placement /// Name of the breaker to create /// Attributes of the breaker to create - /// + /// The breakerBox GameObject private GameObject CreateBreakerBox(SApiObject _src, int _index, string _name, Dictionary _attrs) { Debug.Log($"{_index}: {_name}"); From d8abe2bd081a9303511db28e06ea962f813099bb Mon Sep 17 00:00:00 2001 From: Cedrok Date: Wed, 24 Jul 2024 12:09:32 +0200 Subject: [PATCH 3/8] Add button in right click menu to toggle breakers --- Assets/Localization/Texts Shared Data.asset | 4 + Assets/Localization/Texts_en.asset | 4 + Assets/Scenes/Main.unity | 349 +++++++++++++++++++- Assets/Scripts/OgreeClasses/Rack.cs | 25 +- Assets/Scripts/UiManager.cs | 28 +- 5 files changed, 407 insertions(+), 3 deletions(-) diff --git a/Assets/Localization/Texts Shared Data.asset b/Assets/Localization/Texts Shared Data.asset index 012d182e..327d2ed6 100644 --- a/Assets/Localization/Texts Shared Data.asset +++ b/Assets/Localization/Texts Shared Data.asset @@ -299,6 +299,10 @@ MonoBehaviour: m_Key: Save Object Position m_Metadata: m_Items: [] + - m_Id: 52524171569664000 + m_Key: Toggle breakers + m_Metadata: + m_Items: [] m_Metadata: m_Items: [] m_KeyGenerator: diff --git a/Assets/Localization/Texts_en.asset b/Assets/Localization/Texts_en.asset index c99cba97..aacc90c0 100644 --- a/Assets/Localization/Texts_en.asset +++ b/Assets/Localization/Texts_en.asset @@ -317,6 +317,10 @@ MonoBehaviour: m_Localized: Save object position ? m_Metadata: m_Items: [] + - m_Id: 52524171569664000 + m_Localized: Breakers + m_Metadata: + m_Items: [] references: version: 2 RefIds: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 5b4eddb8..deb4be55 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -9037,6 +9037,7 @@ RectTransform: - {fileID: 1932232404} - {fileID: 2023338576} - {fileID: 314828350} + - {fileID: 1782826391} - {fileID: 577279988} - {fileID: 1286022686} - {fileID: 1734394082} @@ -9951,7 +9952,7 @@ MonoBehaviour: m_Calls: [] m_text: 'Build date: 2024-07-24 - Commit #207ecf9' + Commit #056371ad' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2} @@ -19471,6 +19472,7 @@ MonoBehaviour: gridForULocation: {fileID: 0} areUHelpersToggled: 0 breakersBoxes: [] + areBreakersToggled: 0 --- !u!1 &1585158489 GameObject: m_ObjectHideFlags: 0 @@ -19959,6 +19961,10 @@ MonoBehaviour: hideWhenUseless: 0 button: {fileID: 314828351} toggledColor: {r: 0, g: 0, b: 0, a: 0} + toggleBreakersBtn: + hideWhenUseless: 0 + button: {fileID: 1782826393} + toggledColor: {r: 0, g: 0, b: 0, a: 0} toggleLocalCSBtn: hideWhenUseless: 0 button: {fileID: 577279989} @@ -23696,6 +23702,172 @@ MonoBehaviour: references: version: 2 RefIds: [] +--- !u!1 &1782826390 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1782826391} + - component: {fileID: 1782826395} + - component: {fileID: 1782826394} + - component: {fileID: 1782826393} + - component: {fileID: 1782826392} + m_Layer: 5 + m_Name: ButtonToggleBreakers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1782826391 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782826390} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1934183495} + m_Father: {fileID: 731465983} + 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: 166.7, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1782826392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782826390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: 160 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1782826393 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782826390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1782826394} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1595579791} + m_TargetAssemblyTypeName: UiManager, Assembly-CSharp + m_MethodName: ToggleBreakers + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1595579791} + m_TargetAssemblyTypeName: UiManager, Assembly-CSharp + m_MethodName: HideRightClickMenu + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1782826394 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782826390} + 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: 10905, guid: 0000000000000000f000000000000000, type: 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 &1782826395 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1782826390} + m_CullTransparentMesh: 0 --- !u!1 &1783257382 GameObject: m_ObjectHideFlags: 0 @@ -25556,6 +25728,181 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1932232403} m_CullTransparentMesh: 0 +--- !u!1 &1934183494 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1934183495} + - component: {fileID: 1934183498} + - component: {fileID: 1934183497} + - component: {fileID: 1934183496} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1934183495 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1934183494} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1782826391} + 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 &1934183496 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1934183494} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3} + m_Name: + m_EditorClassIdentifier: + m_StringReference: + m_TableReference: + m_TableCollectionName: GUID:0ddcf4eeba13f914cb3df74b9222d758 + m_TableEntryReference: + m_KeyId: 52524171569664000 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_FormatArguments: [] + m_UpdateString: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1934183497} + m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro + m_MethodName: set_text + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 1 + references: + version: 2 + RefIds: [] +--- !u!114 &1934183497 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1934183494} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: Toggle U helpers + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 14 + m_fontSizeBase: 18 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 5 + m_fontSizeMax: 14 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 1 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 5, y: 2, z: 5, w: 3} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1934183498 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1934183494} + m_CullTransparentMesh: 0 --- !u!1 &1944165007 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/OgreeClasses/Rack.cs b/Assets/Scripts/OgreeClasses/Rack.cs index 23139a20..27969a43 100644 --- a/Assets/Scripts/OgreeClasses/Rack.cs +++ b/Assets/Scripts/OgreeClasses/Rack.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Newtonsoft.Json.Linq; using UnityEngine; @@ -8,6 +8,7 @@ public class Rack : Item public GameObject gridForULocation; public bool areUHelpersToggled = false; public List breakersBoxes = new(); + public bool areBreakersToggled = true; public override void UpdateFromSApiObject(SApiObject _src) { @@ -81,4 +82,26 @@ private GameObject CreateBreakerBox(SApiObject _src, int _index, string _name, D return newBreaker; } + + /// + /// Toggle and hide or display regarding its new value + /// + public void ToggleBreakers() + { + areBreakersToggled ^= true; + foreach (GameObject breaker in breakersBoxes) + breaker.SetActive(areBreakersToggled); + } + + /// + /// Set and hide or display regarding its new value + /// + /// The value to set + public void ToggleBreakersBoxes(bool _value) + { + areBreakersToggled = _value; + foreach (GameObject breaker in breakersBoxes) + breaker.SetActive(_value); + } } + diff --git a/Assets/Scripts/UiManager.cs b/Assets/Scripts/UiManager.cs index 3c5f1f33..9ad5c334 100644 --- a/Assets/Scripts/UiManager.cs +++ b/Assets/Scripts/UiManager.cs @@ -47,6 +47,7 @@ public class UiManager : MonoBehaviour [SerializeField] private ButtonHandler toggleSepNamesBtn; [SerializeField] private ButtonHandler toggleGenNamesBtn; [SerializeField] private ButtonHandler toggleUHelpersBtn; + [SerializeField] private ButtonHandler toggleBreakersBtn; [SerializeField] private ButtonHandler toggleLocalCSBtn; [SerializeField] private ButtonHandler toggleChildrenOriginBtn; [SerializeField] private ButtonHandler toggleClearanceBtn; @@ -422,6 +423,22 @@ item is Device }; toggleUHelpersBtn.Check(); + toggleBreakersBtn = new(toggleBreakersBtn.button, true) + { + interactCondition = () => menuTarget + && + menuTarget.GetComponent() is Rack rack + && + rack.breakersBoxes.Count > 0, + + toggledCondition = () => menuTarget + && + menuTarget.GetComponent() is Rack rack + && + rack.areBreakersToggled + }; + toggleBreakersBtn.Check(); + toggleLocalCSBtn = new(toggleLocalCSBtn.button, true) { interactCondition = () => menuTarget @@ -1063,7 +1080,7 @@ public void ToggleGenericsName() } /// - /// Called by GUI button: if currentItem is a rack, toggle U helpers. + /// Called by GUI button: toggle U helpers of targeted Rack. /// public void ToggleUHelpers() { @@ -1071,6 +1088,15 @@ public void ToggleUHelpers() toggleUHelpersBtn.Check(); } + /// + /// Called by GUI button: toggle breakers of targeted Rack + /// + public void ToggleBreakers() + { + menuTarget.GetComponent().ToggleBreakers(); + toggleBreakersBtn.Check(); + } + /// /// Called by GUI: toggle local Coordinate System of the object targeted by right click menu. /// From d9990d9be2161da70b6090e5f7b082709f41e09e Mon Sep 17 00:00:00 2001 From: Cedrok Date: Wed, 24 Jul 2024 17:42:50 +0200 Subject: [PATCH 4/8] Auto breakers in config.toml & settings panel --- Assets/Localization/Texts Shared Data.asset | 4 + Assets/Localization/Texts_en.asset | 4 + Assets/Prefabs/UI/PanelSettings.prefab | 1277 +++++++++++++++-- Assets/Resources/config.toml | 2 + Assets/Scenes/Main.unity | 292 +++- Assets/Scripts/ConfigHandler.cs | 1 + Assets/Scripts/Enums_Strucs/FixedValues.cs | 2 + Assets/Scripts/OgreeClasses/Rack.cs | 5 +- .../OgreeGenerators/ObjectGenerator.cs | 1 + Assets/Scripts/UiManager.cs | 30 + 10 files changed, 1511 insertions(+), 107 deletions(-) diff --git a/Assets/Localization/Texts Shared Data.asset b/Assets/Localization/Texts Shared Data.asset index 327d2ed6..f3aa2393 100644 --- a/Assets/Localization/Texts Shared Data.asset +++ b/Assets/Localization/Texts Shared Data.asset @@ -303,6 +303,10 @@ MonoBehaviour: m_Key: Toggle breakers m_Metadata: m_Items: [] + - m_Id: 52574482053206016 + m_Key: Automatically enable Breakers + m_Metadata: + m_Items: [] m_Metadata: m_Items: [] m_KeyGenerator: diff --git a/Assets/Localization/Texts_en.asset b/Assets/Localization/Texts_en.asset index aacc90c0..52ecb40f 100644 --- a/Assets/Localization/Texts_en.asset +++ b/Assets/Localization/Texts_en.asset @@ -321,6 +321,10 @@ MonoBehaviour: m_Localized: Breakers m_Metadata: m_Items: [] + - m_Id: 52574482053206016 + m_Localized: Automatically enable breakers + m_Metadata: + m_Items: [] references: version: 2 RefIds: diff --git a/Assets/Prefabs/UI/PanelSettings.prefab b/Assets/Prefabs/UI/PanelSettings.prefab index 2ebd82cc..11c89ceb 100644 --- a/Assets/Prefabs/UI/PanelSettings.prefab +++ b/Assets/Prefabs/UI/PanelSettings.prefab @@ -13,7 +13,7 @@ GameObject: - component: {fileID: 5322437056209329683} - component: {fileID: 4390567524356044209} m_Layer: 5 - m_Name: ButtonResetDoubleClickDelay + m_Name: ButtonResetAutoUHelpers m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -478,7 +478,7 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 + m_fontSize: 20.6 m_fontSizeBase: 24 m_fontWeight: 400 m_enableAutoSizing: 1 @@ -1386,6 +1386,7 @@ RectTransform: m_Children: - {fileID: 4881656708776081739} - {fileID: 7355239274010778797} + - {fileID: 5131149199305095252} - {fileID: 6733102408915853169} - {fileID: 8996658087367561211} - {fileID: 3187995089520386135} @@ -1395,7 +1396,7 @@ RectTransform: 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: 159} + m_AnchoredPosition: {x: 0, y: 158} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &3096052615294264584 @@ -1416,7 +1417,7 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 1 - m_Spacing: -30 + m_Spacing: -42 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 m_ChildControlWidth: 0 @@ -1827,12 +1828,12 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 36 + m_fontSize: 33.25 m_fontSizeBase: 36 m_fontWeight: 400 - m_enableAutoSizing: 0 + m_enableAutoSizing: 1 m_fontSizeMin: 18 - m_fontSizeMax: 72 + m_fontSizeMax: 36 m_fontStyle: 0 m_HorizontalAlignment: 4 m_VerticalAlignment: 256 @@ -1920,7 +1921,7 @@ GameObject: - component: {fileID: 1193875410793814238} - component: {fileID: 1399430230503687507} m_Layer: 5 - m_Name: ToggleAUtoUHelpers + m_Name: ToggleAutoUHelpers m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2612,6 +2613,81 @@ RectTransform: m_AnchoredPosition: {x: -5, y: 0} m_SizeDelta: {x: -20, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &2712047011163281469 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6478904007918871754} + - component: {fileID: 7622190820125365983} + - component: {fileID: 2858641425948258992} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6478904007918871754 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2712047011163281469} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7403388517544357143} + 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_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7622190820125365983 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2712047011163281469} + m_CullTransparentMesh: 1 +--- !u!114 &2858641425948258992 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2712047011163281469} + 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: 10901, guid: 0000000000000000f000000000000000, type: 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!1 &2727722356604176638 GameObject: m_ObjectHideFlags: 0 @@ -3482,7 +3558,7 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 24 + m_fontSize: 22.95 m_fontSizeBase: 24 m_fontWeight: 400 m_enableAutoSizing: 1 @@ -4074,7 +4150,7 @@ GameObject: - component: {fileID: 3170963606226707134} - component: {fileID: 4163207381508734648} m_Layer: 5 - m_Name: ButtonSaveDoubleClickDelay + m_Name: ButtonSaveAutoUHelpers m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4900,6 +4976,142 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5795878213802730512 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5131149199305095252} + m_Layer: 5 + m_Name: AutoBreakers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5131149199305095252 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5795878213802730512} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1683398847568668274} + - {fileID: 1459118238864388313} + - {fileID: 3603245087556907410} + - {fileID: 1905311896215934711} + m_Father: {fileID: 5415366568414033639} + 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: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &5869494006685378542 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1459118238864388313} + - component: {fileID: 5495349538164490875} + m_Layer: 5 + m_Name: ToggleAutoBreakers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1459118238864388313 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5869494006685378542} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.47, y: 1.47, z: 1.47} + m_ConstrainProportionsScale: 1 + m_Children: + - {fileID: 7403388517544357143} + m_Father: {fileID: 5131149199305095252} + 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: 154, y: 0} + m_SizeDelta: {x: 160, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5495349538164490875 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5869494006685378542} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1193015314983690568} + toggleTransition: 1 + graphic: {fileID: 2858641425948258992} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: + m_MethodName: + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_IsOn: 1 --- !u!1 &5879166141938665887 GameObject: m_ObjectHideFlags: 0 @@ -6201,7 +6413,7 @@ MonoBehaviour: references: version: 2 RefIds: [] ---- !u!1 &7538448857165686039 +--- !u!1 &7505526875965003765 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -6209,10 +6421,10 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 4895859668830067078} - - component: {fileID: 7622246428392001356} - - component: {fileID: 5604223439530039441} - - component: {fileID: 2305880127766266665} + - component: {fileID: 6408402010268900754} + - component: {fileID: 8654330878446914013} + - component: {fileID: 8320073165860979463} + - component: {fileID: 6825006651603462729} m_Layer: 5 m_Name: Text (TMP) m_TagString: Untagged @@ -6220,40 +6432,40 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &4895859668830067078 +--- !u!224 &6408402010268900754 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7538448857165686039} + m_GameObject: {fileID: 7505526875965003765} 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_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 6862930775848361731} + m_Father: {fileID: 1905311896215934711} 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!222 &7622246428392001356 +--- !u!222 &8654330878446914013 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7538448857165686039} + m_GameObject: {fileID: 7505526875965003765} m_CullTransparentMesh: 1 ---- !u!114 &5604223439530039441 +--- !u!114 &8320073165860979463 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7538448857165686039} + m_GameObject: {fileID: 7505526875965003765} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -6336,13 +6548,13 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!114 &2305880127766266665 +--- !u!114 &6825006651603462729 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7538448857165686039} + m_GameObject: {fileID: 7505526875965003765} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3} @@ -6361,7 +6573,7 @@ MonoBehaviour: m_UpdateString: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 5604223439530039441} + - m_Target: {fileID: 8320073165860979463} m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro m_MethodName: set_text m_Mode: 0 @@ -6376,7 +6588,7 @@ MonoBehaviour: references: version: 2 RefIds: [] ---- !u!1 &7618703812262173520 +--- !u!1 &7538448857165686039 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -6384,53 +6596,54 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 200908331020963750} - - component: {fileID: 3996927805997869708} - - component: {fileID: 8777472198492401173} + - component: {fileID: 4895859668830067078} + - component: {fileID: 7622246428392001356} + - component: {fileID: 5604223439530039441} + - component: {fileID: 2305880127766266665} m_Layer: 5 - m_Name: Background + m_Name: Text (TMP) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &200908331020963750 +--- !u!224 &4895859668830067078 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7618703812262173520} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 7538448857165686039} + 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_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 2835404929973862870} + m_Father: {fileID: 6862930775848361731} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.25} - m_AnchorMax: {x: 1, y: 0.75} - m_AnchoredPosition: {x: -0.00012207031, y: 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!222 &3996927805997869708 +--- !u!222 &7622246428392001356 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7618703812262173520} + m_GameObject: {fileID: 7538448857165686039} m_CullTransparentMesh: 1 ---- !u!114 &8777472198492401173 +--- !u!114 &5604223439530039441 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7618703812262173520} + m_GameObject: {fileID: 7538448857165686039} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} @@ -6441,25 +6654,507 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 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!1 &7796207959507637869 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1014881645336579952} + m_text: Save + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &2305880127766266665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7538448857165686039} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3} + m_Name: + m_EditorClassIdentifier: + m_StringReference: + m_TableReference: + m_TableCollectionName: GUID:0ddcf4eeba13f914cb3df74b9222d758 + m_TableEntryReference: + m_KeyId: 34327832694784 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_FormatArguments: [] + m_UpdateString: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 5604223439530039441} + m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro + m_MethodName: set_text + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 1 + references: + version: 2 + RefIds: [] +--- !u!1 &7618703812262173520 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 200908331020963750} + - component: {fileID: 3996927805997869708} + - component: {fileID: 8777472198492401173} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &200908331020963750 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7618703812262173520} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2835404929973862870} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.25} + m_AnchorMax: {x: 1, y: 0.75} + m_AnchoredPosition: {x: -0.00012207031, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3996927805997869708 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7618703812262173520} + m_CullTransparentMesh: 1 +--- !u!114 &8777472198492401173 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7618703812262173520} + 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: 10907, guid: 0000000000000000f000000000000000, type: 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!1 &7647019466782015815 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1683398847568668274} + - component: {fileID: 2554818060994782317} + - component: {fileID: 9071641464920676961} + - component: {fileID: 4716760520907354939} + m_Layer: 5 + m_Name: TextAutoBreakers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1683398847568668274 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7647019466782015815} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5131149199305095252} + 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: -191, y: 0} + m_SizeDelta: {x: 385.974, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2554818060994782317 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7647019466782015815} + m_CullTransparentMesh: 1 +--- !u!114 &9071641464920676961 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7647019466782015815} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: Automatically enable U helpers + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 31.25 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 36 + m_fontStyle: 0 + m_HorizontalAlignment: 4 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: -167.72366, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &4716760520907354939 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7647019466782015815} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3} + m_Name: + m_EditorClassIdentifier: + m_StringReference: + m_TableReference: + m_TableCollectionName: GUID:0ddcf4eeba13f914cb3df74b9222d758 + m_TableEntryReference: + m_KeyId: 52574482053206016 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_FormatArguments: [] + m_UpdateString: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 9071641464920676961} + m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro + m_MethodName: set_text + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 1 + references: + version: 2 + RefIds: [] +--- !u!1 &7788657357254108419 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1905311896215934711} + - component: {fileID: 8286103727133319441} + - component: {fileID: 4146041637839448655} + - component: {fileID: 2603164646194178824} + m_Layer: 5 + m_Name: ButtonSaveBreakers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1905311896215934711 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7788657357254108419} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6408402010268900754} + m_Father: {fileID: 5131149199305095252} + 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: 484, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8286103727133319441 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7788657357254108419} + m_CullTransparentMesh: 1 +--- !u!114 &4146041637839448655 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7788657357254108419} + 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: 10905, guid: 0000000000000000f000000000000000, type: 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!114 &2603164646194178824 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7788657357254108419} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4146041637839448655} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: SliderToDefault, Assembly-CSharp + m_MethodName: ResetSlider + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &7796207959507637869 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1014881645336579952} - component: {fileID: 6235092223571242516} - component: {fileID: 387100471699192903} - component: {fileID: 1266805997018359423} @@ -7453,56 +8148,231 @@ MonoBehaviour: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8388352360999109950} + m_GameObject: {fileID: 8388352360999109950} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5991081222107312086} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: SliderToDefault, Assembly-CSharp + m_MethodName: ResetSlider + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!1 &8397108133835137077 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5430574751496819087} + - component: {fileID: 9060880900318603366} + - component: {fileID: 3951687214200044009} + - component: {fileID: 1285630536827154413} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5430574751496819087 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8397108133835137077} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3603245087556907410} + 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!222 &9060880900318603366 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8397108133835137077} + m_CullTransparentMesh: 1 +--- !u!114 &3951687214200044009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8397108133835137077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: Reset + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!114 &1285630536827154413 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8397108133835137077} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 5991081222107312086} - m_OnClick: + m_StringReference: + m_TableReference: + m_TableCollectionName: GUID:0ddcf4eeba13f914cb3df74b9222d758 + m_TableEntryReference: + m_KeyId: 34211440758784 + m_Key: + m_FallbackState: 0 + m_WaitForCompletion: 0 + m_LocalVariables: [] + m_FormatArguments: [] + m_UpdateString: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: SliderToDefault, Assembly-CSharp - m_MethodName: ResetSlider - m_Mode: 1 + - m_Target: {fileID: 3951687214200044009} + m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro + m_MethodName: set_text + m_Mode: 0 m_Arguments: m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_ObjectArgumentAssemblyTypeName: m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: m_BoolArgument: 0 - m_CallState: 2 + m_CallState: 1 + references: + version: 2 + RefIds: [] --- !u!1 &8565783028276359920 GameObject: m_ObjectHideFlags: 0 @@ -7770,6 +8640,82 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &8651971020998067950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7403388517544357143} + - component: {fileID: 3839242841915337846} + - component: {fileID: 1193015314983690568} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7403388517544357143 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8651971020998067950} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6478904007918871754} + m_Father: {fileID: 1459118238864388313} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -10} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3839242841915337846 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8651971020998067950} + m_CullTransparentMesh: 1 +--- !u!114 &1193015314983690568 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8651971020998067950} + 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: 10905, guid: 0000000000000000f000000000000000, type: 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!1 &8752789344601951673 GameObject: m_ObjectHideFlags: 0 @@ -8639,6 +9585,139 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &9185345460664774681 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3603245087556907410} + - component: {fileID: 4825801727393692196} + - component: {fileID: 7899277465047564160} + - component: {fileID: 1233841398176555371} + m_Layer: 5 + m_Name: ButtonResetBreakers + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3603245087556907410 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9185345460664774681} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5430574751496819087} + m_Father: {fileID: 5131149199305095252} + 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: 314, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4825801727393692196 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9185345460664774681} + m_CullTransparentMesh: 1 +--- !u!114 &7899277465047564160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9185345460664774681} + 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: 10905, guid: 0000000000000000f000000000000000, type: 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!114 &1233841398176555371 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9185345460664774681} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 7899277465047564160} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: SliderToDefault, Assembly-CSharp + m_MethodName: ResetSlider + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &9196235949770052012 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/config.toml b/Assets/Resources/config.toml index e2358e77..42004003 100644 --- a/Assets/Resources/config.toml +++ b/Assets/Resources/config.toml @@ -13,6 +13,8 @@ alphaOnInteract = 50 doubleClickDelay = 0.25 # Enable or disable automatic U Helpers generation autoUHelpers = true +# Enable or disable automatic Breakers generation +autoBreakers = true # Camera settings # Value clamped from 1 to 50, 15 by default diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index deb4be55..5cc6bd29 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -19694,6 +19694,7 @@ MonoBehaviour: cacheLimitMo: 0 cliPort: 0 autoUHelpers: 0 + autoBreakers: 0 temperatureMinC: 0 temperatureMaxC: 0 temperatureMinF: 0 @@ -20022,6 +20023,8 @@ MonoBehaviour: layersList: {fileID: 1755458167} autoUHelpersToggle: {fileID: 424550259} defaultAutoUHelpers: 0 + autoBreakersToggle: {fileID: 9063230909488905869} + defaultAutoBreakers: 0 doubleClickSlider: {fileID: 155907487} defaultDoubleClickDelay: 0 moveSpeedSlider: {fileID: 1699817956} @@ -30104,16 +30107,51 @@ PrefabInstance: propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName value: UnityEngine.Object, UnityEngine objectReference: {fileID: 0} + - target: {fileID: 958200489604374738, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 958200489604374738, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 958200489604374738, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 958200489604374738, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -456 + objectReference: {fileID: 0} - target: {fileID: 1047438629383508571, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMax.x - value: 0.5 + value: 0.4949495 objectReference: {fileID: 0} - target: {fileID: 1047438629383508571, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 1233841398176555371, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1595579791} + - target: {fileID: 1233841398176555371, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: ResetAutoBreakers + objectReference: {fileID: 0} + - target: {fileID: 1233841398176555371, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: UiManager, Assembly-CSharp + objectReference: {fileID: 0} - target: {fileID: 1399430230503687507, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Mode @@ -30139,6 +30177,21 @@ PrefabInstance: propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName value: UnityEngine.Object, UnityEngine objectReference: {fileID: 0} + - target: {fileID: 1531875042698619489, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.24242425 + objectReference: {fileID: 0} + - target: {fileID: 1531875042698619489, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1531875042698619489, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.24242425 + objectReference: {fileID: 0} - target: {fileID: 1930809788297861219, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -30157,13 +30210,48 @@ PrefabInstance: - target: {fileID: 1932646498240223527, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMax.x - value: 0.5 + value: 0.2857143 objectReference: {fileID: 0} - target: {fileID: 1932646498240223527, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 2603164646194178824, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1595579791} + - target: {fileID: 2603164646194178824, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SaveAutoBreakers + objectReference: {fileID: 0} + - target: {fileID: 2603164646194178824, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: UiManager, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 3187995089520386135, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3187995089520386135, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3187995089520386135, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 3187995089520386135, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -340 + objectReference: {fileID: 0} - target: {fileID: 3588678667937455377, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -30224,6 +30312,56 @@ PrefabInstance: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName value: UiManager, Assembly-CSharp objectReference: {fileID: 0} + - target: {fileID: 4708992199623389888, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.24242425 + objectReference: {fileID: 0} + - target: {fileID: 4708992199623389888, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4881656708776081739, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4881656708776081739, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4881656708776081739, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 4881656708776081739, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -50 + objectReference: {fileID: 0} + - target: {fileID: 5131149199305095252, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5131149199305095252, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5131149199305095252, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 5131149199305095252, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -166 + objectReference: {fileID: 0} - target: {fileID: 5342829361051453508, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Mode @@ -30249,6 +30387,51 @@ PrefabInstance: propertyPath: m_OnValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName value: UnityEngine.Object, UnityEngine objectReference: {fileID: 0} + - target: {fileID: 5495349538164490875, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5495349538164490875, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1595579791} + - target: {fileID: 5495349538164490875, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: UpdateAutoBreakers + objectReference: {fileID: 0} + - target: {fileID: 5495349538164490875, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: UiManager, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 5495349538164490875, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 6733102408915853169, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6733102408915853169, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6733102408915853169, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 6733102408915853169, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -224 + objectReference: {fileID: 0} - target: {fileID: 6902218655036303665, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -30359,6 +30542,46 @@ PrefabInstance: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName value: UiManager, Assembly-CSharp objectReference: {fileID: 0} + - target: {fileID: 7355239274010778797, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7355239274010778797, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7355239274010778797, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 7355239274010778797, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -108 + objectReference: {fileID: 0} + - target: {fileID: 7406861077902301984, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7406861077902301984, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7406861077902301984, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 7406861077902301984, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -398 + objectReference: {fileID: 0} - target: {fileID: 7636689357664516468, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target @@ -30442,7 +30665,7 @@ PrefabInstance: - target: {fileID: 7931593814895314924, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMax.x - value: 0.5 + value: 0.2857143 objectReference: {fileID: 0} - target: {fileID: 7931593814895314924, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} @@ -30452,7 +30675,7 @@ PrefabInstance: - target: {fileID: 7931593814895314924, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMin.x - value: 0.5 + value: 0.2857143 objectReference: {fileID: 0} - target: {fileID: 8732162560358052632, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} @@ -30469,10 +30692,20 @@ PrefabInstance: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName value: UiManager, Assembly-CSharp objectReference: {fileID: 0} + - target: {fileID: 8887647653230692592, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.40000007 + objectReference: {fileID: 0} + - target: {fileID: 8887647653230692592, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8913694613219766002, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMax.x - value: 0.5 + value: 0.4949495 objectReference: {fileID: 0} - target: {fileID: 8913694613219766002, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} @@ -30482,7 +30715,27 @@ PrefabInstance: - target: {fileID: 8913694613219766002, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} propertyPath: m_AnchorMin.x - value: 0.5 + value: 0.4949495 + objectReference: {fileID: 0} + - target: {fileID: 8996658087367561211, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8996658087367561211, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8996658087367561211, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 8996658087367561211, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -282 objectReference: {fileID: 0} - target: {fileID: 9063230908609081712, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} @@ -30599,11 +30852,38 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 9183965988880441904, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.40000007 + objectReference: {fileID: 0} + - target: {fileID: 9183965988880441904, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9183965988880441904, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.40000007 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: ac18c11896bbaf8428707dc304261ae7, type: 3} +--- !u!114 &9063230909488905869 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 5495349538164490875, guid: ac18c11896bbaf8428707dc304261ae7, + type: 3} + m_PrefabInstance: {fileID: 9063230909488905868} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ConfigHandler.cs b/Assets/Scripts/ConfigHandler.cs index ca769d52..5a3babff 100644 --- a/Assets/Scripts/ConfigHandler.cs +++ b/Assets/Scripts/ConfigHandler.cs @@ -129,6 +129,7 @@ private void ModifyConfig(TomlTable _customConfig) config.AlphaOnInteract = Convert.ToInt32(table["alphaOnInteract"]); config.DoubleClickDelay = Convert.ToSingle(table["doubleClickDelay"]); config.autoUHelpers = (bool)table["autoUHelpers"]; + config.autoBreakers = (bool)table["autoBreakers"]; config.MoveSpeed = Convert.ToInt32(table["moveSpeed"]); config.RotationSpeed = Convert.ToInt32(table["rotationSpeed"]); diff --git a/Assets/Scripts/Enums_Strucs/FixedValues.cs b/Assets/Scripts/Enums_Strucs/FixedValues.cs index 13a30706..2459f5f5 100644 --- a/Assets/Scripts/Enums_Strucs/FixedValues.cs +++ b/Assets/Scripts/Enums_Strucs/FixedValues.cs @@ -207,6 +207,7 @@ public float AlphaOnInteract set => alphaOnInteract = Mathf.Clamp(value, 0, 100); } public bool autoUHelpers; + public bool autoBreakers; public Dictionary textures; public Dictionary colors; public int temperatureMinC; @@ -274,6 +275,7 @@ public class DefaultValues FbxRoot = "https://github.com/ditrit/OGrEE-3dModels/raw/master/", AlphaOnInteract = 50, autoUHelpers = true, + autoBreakers = true, textures = new() { { "perf22", "https://raw.githubusercontent.com/ditrit/OGREE-3D/master/Assets/Resources/Textures/TilePerf22.png" }, diff --git a/Assets/Scripts/OgreeClasses/Rack.cs b/Assets/Scripts/OgreeClasses/Rack.cs index 27969a43..7e227bac 100644 --- a/Assets/Scripts/OgreeClasses/Rack.cs +++ b/Assets/Scripts/OgreeClasses/Rack.cs @@ -8,7 +8,7 @@ public class Rack : Item public GameObject gridForULocation; public bool areUHelpersToggled = false; public List breakersBoxes = new(); - public bool areBreakersToggled = true; + public bool areBreakersToggled = false; public override void UpdateFromSApiObject(SApiObject _src) { @@ -47,6 +47,7 @@ private void GenerateBreakersBoxes(SApiObject _src) int index = 0; foreach (var breaker in breakers) breakersBoxes.Add(CreateBreakerBox(_src, index++, breaker.Key, breaker.Value)); + ToggleBreakers(areBreakersToggled); } /// @@ -97,7 +98,7 @@ public void ToggleBreakers() /// Set and hide or display regarding its new value /// /// The value to set - public void ToggleBreakersBoxes(bool _value) + public void ToggleBreakers(bool _value) { areBreakersToggled = _value; foreach (GameObject breaker in breakersBoxes) diff --git a/Assets/Scripts/OgreeGenerators/ObjectGenerator.cs b/Assets/Scripts/OgreeGenerators/ObjectGenerator.cs index 121ab7cc..86dd446b 100644 --- a/Assets/Scripts/OgreeGenerators/ObjectGenerator.cs +++ b/Assets/Scripts/OgreeGenerators/ObjectGenerator.cs @@ -55,6 +55,7 @@ public Rack CreateRack(SApiObject _rk, Transform _parent) newRack.transform.parent = _parent; Rack rack = newRack.GetComponent(); + rack.areBreakersToggled = GameManager.instance.configHandler.config.autoBreakers; rack.UpdateFromSApiObject(_rk); DisplayObjectData dod = newRack.GetComponent(); diff --git a/Assets/Scripts/UiManager.cs b/Assets/Scripts/UiManager.cs index 9ad5c334..8c458dfa 100644 --- a/Assets/Scripts/UiManager.cs +++ b/Assets/Scripts/UiManager.cs @@ -107,6 +107,8 @@ public class UiManager : MonoBehaviour [Header("Settings Panel")] [SerializeField] private Toggle autoUHelpersToggle; [SerializeField] private bool defaultAutoUHelpers; + [SerializeField] private Toggle autoBreakersToggle; + [SerializeField] private bool defaultAutoBreakers; [SerializeField] private Slider doubleClickSlider; [SerializeField] private float defaultDoubleClickDelay; [SerializeField] private Slider moveSpeedSlider; @@ -671,6 +673,9 @@ private void SetupSettingsPanel() { defaultAutoUHelpers = GameManager.instance.configHandler.config.autoUHelpers; autoUHelpersToggle.isOn = defaultAutoUHelpers; + + defaultAutoBreakers = GameManager.instance.configHandler.config.autoBreakers; + autoBreakersToggle.isOn = defaultAutoBreakers; defaultDoubleClickDelay = GameManager.instance.configHandler.config.DoubleClickDelay; doubleClickSlider.value = defaultDoubleClickDelay; @@ -1338,6 +1343,31 @@ public void SaveAutoUHelpers() GameManager.instance.configHandler.WritePreference("autoUHelpers", autoUHelpersToggle.isOn ? "true" : "false"); } + /// + /// Attached to GUI Toggle. Change value of + /// + /// + public void UpdateAutoBreakers(bool _value) + { + GameManager.instance.configHandler.config.autoBreakers = _value; + } + + /// + /// Called by GUI button. Reset value of using what was given by config.toml + /// + public void ResetAutoBreakers() + { + autoBreakersToggle.isOn = defaultAutoBreakers; + } + + /// + /// Called by GUI button. Write the value of in used config.toml file + /// + public void SaveAutoBreakers() + { + GameManager.instance.configHandler.WritePreference("autoBreakers", autoBreakersToggle.isOn ? "true" : "false"); + } + /// /// Attached to GUI Slider. Change value of /// From 7f4afa2775ac00dad4e3d6e5e0311b52b760ebc1 Mon Sep 17 00:00:00 2001 From: Cedrok Date: Thu, 25 Jul 2024 14:24:49 +0200 Subject: [PATCH 5/8] Add fr, pt & es translations --- Assets/Localization/Texts_es.asset | 8 ++++++++ Assets/Localization/Texts_fr.asset | 8 ++++++++ Assets/Localization/Texts_pt.asset | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/Assets/Localization/Texts_es.asset b/Assets/Localization/Texts_es.asset index 513824c0..42c5abd1 100644 --- a/Assets/Localization/Texts_es.asset +++ b/Assets/Localization/Texts_es.asset @@ -317,6 +317,14 @@ MonoBehaviour: m_Localized: "Guardar la posici\xF3n del objeto?" m_Metadata: m_Items: [] + - m_Id: 52524171569664000 + m_Localized: Disyuntores + m_Metadata: + m_Items: [] + - m_Id: 52574482053206016 + m_Localized: "Activaci\xF3n autom\xE1tica de disyuntores" + m_Metadata: + m_Items: [] references: version: 2 RefIds: diff --git a/Assets/Localization/Texts_fr.asset b/Assets/Localization/Texts_fr.asset index 3b68e7ac..48cf704d 100644 --- a/Assets/Localization/Texts_fr.asset +++ b/Assets/Localization/Texts_fr.asset @@ -318,6 +318,14 @@ MonoBehaviour: m_Localized: Sauvegarder la position de l'objet ? m_Metadata: m_Items: [] + - m_Id: 52574482053206016 + m_Localized: Activation automatique des disjoncteurs + m_Metadata: + m_Items: [] + - m_Id: 52524171569664000 + m_Localized: Disjoncteurs + m_Metadata: + m_Items: [] references: version: 2 RefIds: diff --git a/Assets/Localization/Texts_pt.asset b/Assets/Localization/Texts_pt.asset index 8e53c1e9..1434cad4 100644 --- a/Assets/Localization/Texts_pt.asset +++ b/Assets/Localization/Texts_pt.asset @@ -316,6 +316,14 @@ MonoBehaviour: m_Localized: "Salvar a posi\xE7\xE3o do objeto?\r" m_Metadata: m_Items: [] + - m_Id: 52524171569664000 + m_Localized: Disjuntores + m_Metadata: + m_Items: [] + - m_Id: 52574482053206016 + m_Localized: "Ativa\xE7\xE3o autom\xE1tica de disjuntores" + m_Metadata: + m_Items: [] references: version: 2 RefIds: From f2260de9cf300ba1f8ea3ce0c8256b384910805c Mon Sep 17 00:00:00 2001 From: Cedrok Date: Wed, 31 Jul 2024 17:24:05 +0200 Subject: [PATCH 6/8] Breaker takes color of related tag & respond to tag highlight (behaves like a children of the rack) --- Assets/Prefabs/Breaker.prefab | 2 +- Assets/Scripts/GameManager.cs | 2 +- Assets/Scripts/OgreeClasses/Rack.cs | 20 +++++++++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Assets/Prefabs/Breaker.prefab b/Assets/Prefabs/Breaker.prefab index eeaa970c..29410286 100644 --- a/Assets/Prefabs/Breaker.prefab +++ b/Assets/Prefabs/Breaker.prefab @@ -283,7 +283,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6010235731161253863} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 11599482bb3741f4b890d546eeba923f, type: 3} m_Name: diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 97442208..95fba0e9 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -660,7 +660,7 @@ public List GetFocused() #region Tags /// - /// Get a tag in by it's slug. + /// Get a tag in by its slug. /// /// The slug of the tag to search /// The asked tag or null otherwise diff --git a/Assets/Scripts/OgreeClasses/Rack.cs b/Assets/Scripts/OgreeClasses/Rack.cs index 7e227bac..44764e14 100644 --- a/Assets/Scripts/OgreeClasses/Rack.cs +++ b/Assets/Scripts/OgreeClasses/Rack.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Threading.Tasks; using Newtonsoft.Json.Linq; using UnityEngine; @@ -37,7 +38,7 @@ public override void UpdateFromSApiObject(SApiObject _src) /// Cast breakers dictionary and fill /// /// New data of the rack - private void GenerateBreakersBoxes(SApiObject _src) + private async void GenerateBreakersBoxes(SApiObject _src) { for (int i = 0; i < breakersBoxes.Count; i++) Destroy(breakersBoxes[i]); @@ -46,7 +47,7 @@ private void GenerateBreakersBoxes(SApiObject _src) Dictionary> breakers = ((JObject)_src.attributes["breakers"]).ToObject>>(); int index = 0; foreach (var breaker in breakers) - breakersBoxes.Add(CreateBreakerBox(_src, index++, breaker.Key, breaker.Value)); + breakersBoxes.Add(await CreateBreakerBox(_src, index++, breaker.Key, breaker.Value)); ToggleBreakers(areBreakersToggled); } @@ -58,7 +59,7 @@ private void GenerateBreakersBoxes(SApiObject _src) /// Name of the breaker to create /// Attributes of the breaker to create /// The breakerBox GameObject - private GameObject CreateBreakerBox(SApiObject _src, int _index, string _name, Dictionary _attrs) + private async Task CreateBreakerBox(SApiObject _src, int _index, string _name, Dictionary _attrs) { Debug.Log($"{_index}: {_name}"); Vector3 parentSize = transform.GetChild(0).localScale; @@ -76,11 +77,24 @@ private GameObject CreateBreakerBox(SApiObject _src, int _index, string _name, D breakerOO.parentId = _src.id; breakerOO.attributes = _attrs; + GameManager.instance.allItems.Add(breakerOO.id, newBreaker); + DisplayObjectData breakerDoD = newBreaker.GetComponent(); breakerDoD.PlaceTexts(LabelPos.Front); breakerDoD.SetLabel(breakerOO.name); breakerDoD.SwitchLabel(ELabelMode.Default); + if (_attrs.HasKeyAndValue("tag")) + { + string tagName = _attrs["tag"]; + if (GameManager.instance.GetTag(tagName) == null) + await ApiManager.instance.GetObject($"tags/{tagName}", ApiManager.instance.CreateTag); + Tag tag = GameManager.instance.GetTag(tagName); + breakerOO.SetColor(tag.colorCode); + + GameManager.instance.AddToTag(tagName, breakerOO.id); + } + return newBreaker; } From a5363f765c853bdddd13e6a15daf02ed72c1e68f Mon Sep 17 00:00:00 2001 From: Cedrok Date: Wed, 31 Jul 2024 17:34:22 +0200 Subject: [PATCH 7/8] Change breaker default color & prevent layers to catch breaker type --- Assets/Prefabs/Breaker.prefab | 2 +- Assets/Scripts/Layers/LayerManager.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Prefabs/Breaker.prefab b/Assets/Prefabs/Breaker.prefab index 29410286..c3a74074 100644 --- a/Assets/Prefabs/Breaker.prefab +++ b/Assets/Prefabs/Breaker.prefab @@ -243,7 +243,7 @@ MonoBehaviour: localCS: {fileID: 0} isDoomed: 0 isLodLocked: 0 - color: {r: 0, g: 0, b: 0, a: 0} + color: {r: 1, g: 1, b: 1, a: 1} referent: {fileID: 0} tempBar: {fileID: 0} temperatureUnit: diff --git a/Assets/Scripts/Layers/LayerManager.cs b/Assets/Scripts/Layers/LayerManager.cs index 68860863..db3428af 100644 --- a/Assets/Scripts/Layers/LayerManager.cs +++ b/Assets/Scripts/Layers/LayerManager.cs @@ -78,7 +78,7 @@ private void CreateAutoLayersItem(Item _item) { List deviceTypes = new(); foreach (Transform child in _item.transform) - if (child.GetComponent() is Device dv && dv.attributes.ContainsKey("type") && !deviceTypes.Contains((string)dv.attributes["type"])) + if (child.GetComponent() is Device dv && dv.category == "device" && dv.attributes.ContainsKey("type") && !deviceTypes.Contains((string)dv.attributes["type"])) deviceTypes.Add((string)dv.attributes["type"]); foreach (string type in deviceTypes) From aaee759b3630674cbbbd7060706102ea36a1b289 Mon Sep 17 00:00:00 2001 From: Cedrok Date: Fri, 2 Aug 2024 16:53:19 +0200 Subject: [PATCH 8/8] Update build date & Version to 3.7.0 --- Assets/Scenes/Main.unity | 10 +++++----- Assets/Scripts/OgreeClasses/Rack.cs | 1 - ProjectSettings/ProjectSettings.asset | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 5cc6bd29..1c1f5520 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -9950,9 +9950,9 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 'Build date: 2024-07-24 + m_text: 'Build date: 2024-08-02 - Commit #056371ad' + Commit #a5363f7' m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2} @@ -10256,7 +10256,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -58.700134, y: -206.89996} + m_AnchoredPosition: {x: -58.700195, y: -206.89996} m_SizeDelta: {x: -116, y: 257} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &821904126 @@ -25521,7 +25521,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 741869394} m_HandleRect: {fileID: 741869393} m_Direction: 0 - m_Value: 0 + m_Value: 1 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: @@ -28870,7 +28870,7 @@ MonoBehaviour: m_HandleRect: {fileID: 1513977460} m_Direction: 2 m_Value: 1.0000001 - m_Size: 0.5658 + m_Size: 0.5658001 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: diff --git a/Assets/Scripts/OgreeClasses/Rack.cs b/Assets/Scripts/OgreeClasses/Rack.cs index 44764e14..6ca67574 100644 --- a/Assets/Scripts/OgreeClasses/Rack.cs +++ b/Assets/Scripts/OgreeClasses/Rack.cs @@ -61,7 +61,6 @@ private async void GenerateBreakersBoxes(SApiObject _src) /// The breakerBox GameObject private async Task CreateBreakerBox(SApiObject _src, int _index, string _name, Dictionary _attrs) { - Debug.Log($"{_index}: {_name}"); Vector3 parentSize = transform.GetChild(0).localScale; GameObject newBreaker = Instantiate(GameManager.instance.breakerModel, transform); diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index fe84987c..434f1da9 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -136,7 +136,7 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 - bundleVersion: 3.6.1 + bundleVersion: 3.7.0 preloadedAssets: - {fileID: 11400000, guid: 7426e59eb941c184caf24353ca48ff74, type: 2} metroInputSource: 0 @@ -161,7 +161,7 @@ PlayerSettings: applicationIdentifier: Standalone: com.Orness.OGrEE3D buildNumber: - Standalone: 3.6.1 + Standalone: 3.7.0 VisionOS: 0 iPhone: 0 tvOS: 0 @@ -728,10 +728,10 @@ PlayerSettings: PointOfService: False RecordedCallsFolder: False Contacts: False - Proximity: False InternetClient: False CodeGeneration: False BackgroundMediaPlayback: False + Proximity: False metroTargetDeviceFamilies: Desktop: False Holographic: False