From 26372ba6da6cbbc0c3ce0a0916663348dfa8571d Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 13 Oct 2016 14:20:27 +0100 Subject: [PATCH] Added GetToggleState, SetToggleState commands and ToggleChanged event handler --- .../Fungus/Scripts/Commands/GetToggleState.cs | 59 ++ .../Scripts/Commands/GetToggleState.cs.meta | 12 + .../Fungus/Scripts/Commands/SetToggleState.cs | 52 ++ .../Scripts/Commands/SetToggleState.cs.meta | 12 + .../Scripts/EventHandlers/ToggleChanged.cs | 57 ++ .../EventHandlers/ToggleChanged.cs.meta | 12 + Assets/Tests/UI/TextTests.unity | 825 +++++++++++++++++- 7 files changed, 1017 insertions(+), 12 deletions(-) create mode 100644 Assets/Fungus/Scripts/Commands/GetToggleState.cs create mode 100644 Assets/Fungus/Scripts/Commands/GetToggleState.cs.meta create mode 100644 Assets/Fungus/Scripts/Commands/SetToggleState.cs create mode 100644 Assets/Fungus/Scripts/Commands/SetToggleState.cs.meta create mode 100644 Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs create mode 100644 Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs.meta diff --git a/Assets/Fungus/Scripts/Commands/GetToggleState.cs b/Assets/Fungus/Scripts/Commands/GetToggleState.cs new file mode 100644 index 00000000..5dfe9972 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/GetToggleState.cs @@ -0,0 +1,59 @@ +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; +using UnityEngine.UI; + +namespace Fungus +{ + /// + /// Gets the state of a toggle UI object and stores it in a boolean variable. + /// + [CommandInfo("UI", + "Get Toggle State", + "Gets the state of a toggle UI object and stores it in a boolean variable.")] + public class GetToggleState : Command + { + [Tooltip("Target toggle object to get the value from")] + [SerializeField] protected Toggle toggle; + + [Tooltip("Boolean variable to store the state of the toggle value in.")] + [VariableProperty(typeof(BooleanVariable))] + [SerializeField] protected BooleanVariable toggleState; + + #region Public members + + public override void OnEnter() + { + if (toggle != null && + toggleState != null) + { + toggleState.Value = toggle.isOn; + } + + Continue(); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + public override string GetSummary() + { + if (toggle == null) + { + return "Error: Toggle object not selected"; + } + + if (toggleState == null) + { + return "Error: Toggle state variable not selected"; + } + + return toggle.name; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/GetToggleState.cs.meta b/Assets/Fungus/Scripts/Commands/GetToggleState.cs.meta new file mode 100644 index 00000000..b3c3fb10 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/GetToggleState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9750f780c39234a028f87c0016c2d9c0 +timeCreated: 1476363990 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/Commands/SetToggleState.cs b/Assets/Fungus/Scripts/Commands/SetToggleState.cs new file mode 100644 index 00000000..79d9f376 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/SetToggleState.cs @@ -0,0 +1,52 @@ +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; +using UnityEngine.UI; + +namespace Fungus +{ + /// + /// Sets the state of a toggle UI object. + /// + [CommandInfo("UI", + "Set Toggle State", + "Sets the state of a toggle UI object")] + public class SetToggleState : Command + { + [Tooltip("Target toggle object to set the state on")] + [SerializeField] protected Toggle toggle; + + [Tooltip("Boolean value to set the toggle state to.")] + [SerializeField] protected BooleanData value; + + #region Public members + + public override void OnEnter() + { + if (toggle != null) + { + toggle.isOn = value.Value; + } + + Continue(); + } + + public override Color GetButtonColor() + { + return new Color32(235, 191, 217, 255); + } + + public override string GetSummary() + { + if (toggle == null) + { + return "Error: Toggle object not selected"; + } + + return toggle.name + " = " + value.GetDescription(); + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Fungus/Scripts/Commands/SetToggleState.cs.meta b/Assets/Fungus/Scripts/Commands/SetToggleState.cs.meta new file mode 100644 index 00000000..b33987c5 --- /dev/null +++ b/Assets/Fungus/Scripts/Commands/SetToggleState.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 41ef36697f78e4c6e909d158bd8ccc83 +timeCreated: 1444656241 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs b/Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs new file mode 100644 index 00000000..18b974af --- /dev/null +++ b/Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs @@ -0,0 +1,57 @@ +// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). +// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) + +using UnityEngine; +using UnityEngine.UI; + +namespace Fungus +{ + /// + /// The block will execute when the user toggles on the target UI toggle object. + /// + [EventHandlerInfo("UI", + "Toggle Changed", + "The block will execute when the state of the target UI toggle object changes. The state of the toggle is stored in the Toggle State boolean variable.")] + [AddComponentMenu("")] + public class ToggleChanged : EventHandler + { + [Tooltip("The block will execute when the state of the target UI toggle object changes.")] + [SerializeField] protected Toggle targetToggle; + + [Tooltip("The new state of the UI toggle object is stored in this boolean variable.")] + [VariableProperty(typeof(BooleanVariable))] + [SerializeField] protected BooleanVariable toggleState; + + #region Public members + + public virtual void Start() + { + if (targetToggle != null) + { + targetToggle.onValueChanged.AddListener(OnToggleChanged); + } + } + + protected virtual void OnToggleChanged(bool state) + { + if (toggleState != null) + { + toggleState.Value = state; + } + + ExecuteBlock(); + } + + public override string GetSummary() + { + if (targetToggle != null) + { + return targetToggle.name; + } + + return "None"; + } + + #endregion + } +} diff --git a/Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs.meta b/Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs.meta new file mode 100644 index 00000000..46baa579 --- /dev/null +++ b/Assets/Fungus/Scripts/EventHandlers/ToggleChanged.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b8a46229539b246deb96f8cbfc904fac +timeCreated: 1476362498 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/UI/TextTests.unity b/Assets/Tests/UI/TextTests.unity index 2202016c..f01ff30a 100644 --- a/Assets/Tests/UI/TextTests.unity +++ b/Assets/Tests/UI/TextTests.unity @@ -1173,6 +1173,74 @@ MonoBehaviour: compareType: 0 comparisonType: 4 ignoreCase: 0 +--- !u!1 &444624431 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 444624432} + - 222: {fileID: 444624434} + - 114: {fileID: 444624433} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &444624432 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 444624431} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 983384616} + m_RootOrder: 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!114 &444624433 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 444624431} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &444624434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 444624431} --- !u!1 &493382916 GameObject: m_ObjectHideFlags: 0 @@ -1820,6 +1888,370 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 99} m_SizeDelta: {x: 370, y: 84} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &707100872 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 707100873} + - 114: {fileID: 707100877} + - 114: {fileID: 707100876} + - 114: {fileID: 707100875} + - 114: {fileID: 707100874} + - 114: {fileID: 707100880} + - 114: {fileID: 707100879} + - 114: {fileID: 707100878} + - 114: {fileID: 707100881} + - 114: {fileID: 707100882} + - 114: {fileID: 707100890} + - 114: {fileID: 707100889} + - 114: {fileID: 707100888} + - 114: {fileID: 707100887} + - 114: {fileID: 707100886} + - 114: {fileID: 707100885} + - 114: {fileID: 707100884} + - 114: {fileID: 707100883} + m_Layer: 0 + m_Name: Flowchart + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &707100873 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1558515037} + m_RootOrder: 0 +--- !u!114 &707100874 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5d02d9822eec54c98afe95bb497211b3, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: ToggleVar1 + value: 0 +--- !u!114 &707100875 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b8a46229539b246deb96f8cbfc904fac, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 707100876} + targetToggle: {fileID: 1967662254} + toggleState: {fileID: 707100874} +--- !u!114 &707100876 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 95 + y: 124 + width: 144 + height: 40 + itemId: 0 + blockName: OnToggleChange + description: + eventHandler: {fileID: 707100875} + commandList: + - {fileID: 707100888} + - {fileID: 707100886} + - {fileID: 707100887} + - {fileID: 707100890} + - {fileID: 707100885} + - {fileID: 707100884} + - {fileID: 707100883} + - {fileID: 707100882} +--- !u!114 &707100877 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 0.9219952 + scrollViewRect: + serializedVersion: 2 + x: -350 + y: -352 + width: 1121 + height: 916 + selectedBlock: {fileID: 0} + selectedCommands: [] + variables: + - {fileID: 707100874} + - {fileID: 707100889} + description: 'Tests setting and getting a toggle''s state, and using + + a Toggle Changed event handler.' + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + showLineNumbers: 0 + hideCommands: [] + luaEnvironment: {fileID: 0} + luaBindingName: flowchart +--- !u!114 &707100878 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41ef36697f78e4c6e909d158bd8ccc83, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 2 + indentLevel: 0 + toggle: {fileID: 1967662254} + value: + booleanRef: {fileID: 0} + booleanVal: 1 +--- !u!114 &707100879 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 707100880} +--- !u!114 &707100880 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 97 + y: 48 + width: 120 + height: 40 + itemId: 1 + blockName: Start + description: + eventHandler: {fileID: 707100879} + commandList: + - {fileID: 707100881} + - {fileID: 707100878} +--- !u!114 &707100881 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de9232e9295ed476a8cfb707b5c242b9, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 3 + indentLevel: 0 + frameCount: + integerRef: {fileID: 0} + integerVal: 1 +--- !u!114 &707100882 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4920f47cde1a84b11ad07b7317568494, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + indentLevel: 0 +--- !u!114 &707100883 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 11 + indentLevel: 0 +--- !u!114 &707100884 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 10 + indentLevel: 1 + failMessage: +--- !u!114 &707100885 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 9 + indentLevel: 0 + compareOperator: 0 + variable: {fileID: 707100889} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &707100886 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2dcb71131f45b47fead560a97ef55f1c, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 8 + indentLevel: 1 + failMessage: +--- !u!114 &707100887 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 93cb9773f2ca04e2bbf7a68ccfc23267, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 7 + indentLevel: 0 +--- !u!114 &707100888 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70c5622b8a80845c980954170295f292, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 6 + indentLevel: 0 + compareOperator: 0 + variable: {fileID: 707100874} + booleanData: + booleanRef: {fileID: 0} + booleanVal: 0 + integerData: + integerRef: {fileID: 0} + integerVal: 0 + floatData: + floatRef: {fileID: 0} + floatVal: 0 + stringData: + stringRef: {fileID: 0} + stringVal: +--- !u!114 &707100889 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5d02d9822eec54c98afe95bb497211b3, type: 3} + m_Name: + m_EditorClassIdentifier: + scope: 0 + key: ToggleVar2 + value: 0 +--- !u!114 &707100890 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 707100872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9750f780c39234a028f87c0016c2d9c0, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + indentLevel: 0 + toggle: {fileID: 1967662254} + toggleState: {fileID: 707100889} --- !u!1 &717214671 GameObject: m_ObjectHideFlags: 0 @@ -2413,21 +2845,114 @@ MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 58783f051e477fd4e93b42ec7a43bb64, type: 3} + m_Name: + m_EditorClassIdentifier: + go: {fileID: 1218238772} + thisPropertyPath: Text.text + compareToType: 1 + other: {fileID: 0} + otherPropertyPath: + constantValueGeneric: + compareType: 1 + comparisonType: 4 + ignoreCase: 0 +--- !u!1 &869097864 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 869097865} + - 223: {fileID: 869097868} + - 114: {fileID: 869097867} + - 114: {fileID: 869097866} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &869097865 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 869097864} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1967662253} + m_Father: {fileID: 1558515037} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &869097866 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 869097864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &869097867 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 869097864} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 58783f051e477fd4e93b42ec7a43bb64, type: 3} + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - go: {fileID: 1218238772} - thisPropertyPath: Text.text - compareToType: 1 - other: {fileID: 0} - otherPropertyPath: - constantValueGeneric: - compareType: 1 - comparisonType: 4 - ignoreCase: 0 + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &869097868 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 869097864} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 --- !u!1 &872356301 GameObject: m_ObjectHideFlags: 0 @@ -3200,6 +3725,75 @@ MonoBehaviour: hideCommands: [] luaEnvironment: {fileID: 0} luaBindingName: flowchart +--- !u!1 &983384615 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 983384616} + - 222: {fileID: 983384618} + - 114: {fileID: 983384617} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &983384616 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 983384615} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 444624432} + m_Father: {fileID: 1967662253} + m_RootOrder: 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!114 &983384617 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 983384615} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &983384618 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 983384615} --- !u!1 &988367244 GameObject: m_ObjectHideFlags: 0 @@ -5261,7 +5855,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Name: m_EditorClassIdentifier: - selectedFlowchart: {fileID: 332004786} + selectedFlowchart: {fileID: 707100877} --- !u!4 &1308535842 Transform: m_ObjectHideFlags: 1 @@ -6275,6 +6869,132 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!1 &1539547141 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1539547142} + - 222: {fileID: 1539547144} + - 114: {fileID: 1539547143} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1539547142 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1539547141} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1967662253} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 9, y: -0.5} + m_SizeDelta: {x: -28, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1539547143 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1539547141} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Toggle +--- !u!222 &1539547144 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1539547141} +--- !u!1 &1558515035 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1558515037} + - 114: {fileID: 1558515036} + m_Layer: 0 + m_Name: ToggleTest + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1558515036 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1558515035} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3} + m_Name: + m_EditorClassIdentifier: + timeout: 5 + ignored: 0 + succeedAfterAllAssertionsAreExecuted: 0 + expectException: 0 + expectedExceptionList: + succeedWhenExceptionIsThrown: 0 + includedPlatforms: -1 + platformsToIgnore: [] + dynamic: 0 + dynamicTypeName: +--- !u!4 &1558515037 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1558515035} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 707100873} + - {fileID: 869097865} + m_Father: {fileID: 0} + m_RootOrder: 12 --- !u!1 &1595694581 GameObject: m_ObjectHideFlags: 0 @@ -7998,6 +8718,87 @@ MonoBehaviour: value: floatRef: {fileID: 0} floatVal: 0.5 +--- !u!1 &1967662252 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1967662253} + - 114: {fileID: 1967662254} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1967662253 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1967662252} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 983384616} + - {fileID: 1539547142} + m_Father: {fileID: 869097865} + m_RootOrder: 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: 160, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1967662254 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1967662252} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 983384617} + toggleTransition: 1 + graphic: {fileID: 444624433} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IsOn: 0 --- !u!114 &1992408041 MonoBehaviour: m_ObjectHideFlags: 0