diff --git a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs index bc31f595..3bcfd362 100644 --- a/Assets/Fungus/Flowchart/Editor/BlockEditor.cs +++ b/Assets/Fungus/Flowchart/Editor/BlockEditor.cs @@ -60,10 +60,7 @@ namespace Fungus { SerializedProperty descriptionProp = serializedObject.FindProperty("description"); EditorGUILayout.PropertyField(descriptionProp); - - SerializedProperty runSlowInEditorProp = serializedObject.FindProperty("runSlowInEditor"); - EditorGUILayout.PropertyField(runSlowInEditorProp); - + DrawEventHandlerGUI(flowchart); UpdateIndentLevels(block); diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs b/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs index 5e671054..013aadc2 100644 --- a/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs +++ b/Assets/Fungus/Flowchart/Editor/FlowchartEditor.cs @@ -21,7 +21,7 @@ namespace Fungus protected SerializedProperty descriptionProp; protected SerializedProperty colorCommandsProp; protected SerializedProperty hideComponentsProp; - protected SerializedProperty runSlowDurationProp; + protected SerializedProperty pauseAfterCommandProp; protected SerializedProperty saveSelectionProp; protected SerializedProperty localizationIdProp; protected SerializedProperty variablesProp; @@ -31,7 +31,7 @@ namespace Fungus descriptionProp = serializedObject.FindProperty("description"); colorCommandsProp = serializedObject.FindProperty("colorCommands"); hideComponentsProp = serializedObject.FindProperty("hideComponents"); - runSlowDurationProp = serializedObject.FindProperty("runSlowDuration"); + pauseAfterCommandProp = serializedObject.FindProperty("pauseAfterCommand"); saveSelectionProp = serializedObject.FindProperty("saveSelection"); localizationIdProp = serializedObject.FindProperty("localizationId"); variablesProp = serializedObject.FindProperty("variables"); @@ -48,7 +48,7 @@ namespace Fungus EditorGUILayout.PropertyField(descriptionProp); EditorGUILayout.PropertyField(colorCommandsProp); EditorGUILayout.PropertyField(hideComponentsProp); - EditorGUILayout.PropertyField(runSlowDurationProp); + EditorGUILayout.PropertyField(pauseAfterCommandProp); EditorGUILayout.PropertyField(saveSelectionProp); EditorGUILayout.PropertyField(localizationIdProp); diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 71ad8261..f6b0243e 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -40,9 +40,6 @@ namespace Fungus [Tooltip("Description text to display under the block node")] public string description = ""; - [Tooltip("Slow down execution in the editor to make it easier to visualise program flow")] - public bool runSlowInEditor = true; - public EventHandler eventHandler; [HideInInspector] @@ -236,10 +233,12 @@ namespace Fungus yield return null; } - if (runSlowInEditor) + #if UNITY_EDITOR + if (flowchart.pauseAfterCommand > 0f) { - yield return new WaitForSeconds(flowchart.runSlowDuration); + yield return new WaitForSeconds(flowchart.pauseAfterCommand); } + #endif command.isExecuting = false; } diff --git a/Assets/Fungus/Flowchart/Scripts/Command.cs b/Assets/Fungus/Flowchart/Scripts/Command.cs index 78216bf5..c4dfd665 100644 --- a/Assets/Fungus/Flowchart/Scripts/Command.cs +++ b/Assets/Fungus/Flowchart/Scripts/Command.cs @@ -193,14 +193,6 @@ namespace Fungus { return Color.white; } - - /** - * Adds a delay between commands if the 'Run Slow In Editor' option is enabled. - */ - public virtual bool RunSlowInEditor() - { - return true; - } } } \ No newline at end of file diff --git a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs index 199c2928..fab8e431 100644 --- a/Assets/Fungus/Flowchart/Scripts/Flowchart.cs +++ b/Assets/Fungus/Flowchart/Scripts/Flowchart.cs @@ -83,11 +83,11 @@ namespace Fungus public string description = ""; /** - * Minimum time for each command to execute when runSlowInEditor is enabled. + * Slow down execution in the editor to make it easier to visualise program flow. */ [Range(0f, 5f)] - [Tooltip("Minimum time that each command will take to execute when Run Slow In Editor is enabled")] - public float runSlowDuration = 0.25f; + [Tooltip("Slow down execution in the editor to make it easier to visualise program flow. Does not affect platform builds.")] + public float pauseAfterCommand = 0f; /** * Use command color when displaying the command list in the inspector. diff --git a/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs b/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs index a994cdb9..c2720432 100644 --- a/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs +++ b/Assets/Fungus/Narrative/Scripts/Commands/MenuTimer.cs @@ -53,11 +53,6 @@ namespace Fungus { return new Color32(184, 210, 235, 255); } - - public override bool RunSlowInEditor() - { - return false; - } } } \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 28f888ce..2fae1000 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -16,6 +16,7 @@ PlayerSettings: cloudProjectId: defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} + m_ShowUnitySplashScreen: 1 defaultScreenWidth: 2000 defaultScreenHeight: 2000 defaultScreenWidthWeb: 960 @@ -118,6 +119,7 @@ PlayerSettings: serializedVersion: 2 rgba: 0 iOSLaunchScreenFillPct: 1 + iOSLaunchScreenSize: 100 iOSLaunchScreenCustomXibPath: AndroidTargetDevice: 0 AndroidSplashScreenScale: 0 @@ -130,6 +132,7 @@ PlayerSettings: - width: 320 height: 180 banner: {fileID: 0} + androidGamepadSupportLevel: 0 resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: - m_BuildTarget: