Skip to content

Commit

Permalink
Fix serveral minor issues (#103)
Browse files Browse the repository at this point in the history
Fix issue #1131 (comment)
Fix issue #1131 (comment)
Fix issue #1131 (comment)
  • Loading branch information
PaulDemeulenaere authored and GitHub Enterprise committed Oct 29, 2020
1 parent 15df881 commit fe924b0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions com.unity.visualeffectgraph/Editor/Inspector/VFXAssetEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,18 +446,19 @@ public override void OnInspectorGUI()
}

EditorGUI.showMixedValue = !initialFixedDeltaTime.HasValue;
var deltaTimeContent = EditorGUIUtility.TrTextContent("Fixed Delta Time", "If enabled, use visual effect manager fixed delta time mode.");
var processEveryFrameContent = EditorGUIUtility.TrTextContent("Exact Fixed Time", "Only relevant for fixed delta time mode, if enabled, can process several updates per frame (e.g.: if a frame is 30ms but the fixed frame rate is set to 5ms, it will update 6 times with a 5ms deltaTime instead of one time with a 30ms deltaTime). This update mode isn't efficient and should only be used for really high quality purpose.");
var ignoreTimeScaleContent = EditorGUIUtility.TrTextContent("Ignore Time Scale", "If enabled, the computed visual effect delta time ignore the game time scale value (play rate is still applied).");
var deltaTimeContent = EditorGUIUtility.TrTextContent("Fixed Delta Time", "If enabled, use visual effect manager fixed delta time mode, otherwise, use the default Time.deltaTime.");
var processEveryFrameContent = EditorGUIUtility.TrTextContent("Exact Fixed Time", "Only relevant when using Fixed Delta Time. When enabled, several updates can be processed per frame (e.g.: if a frame is 10ms and the fixed frame rate is set to 5 ms, the effect will update twice with a 5ms deltaTime instead of once with a 10ms deltaTime). This method is expensive and should only be used for high-end scenarios.");
var ignoreTimeScaleContent = EditorGUIUtility.TrTextContent("Ignore Time Scale", "When enabled, the computed visual effect delta time ignores the game Time Scale value (Play Rate is still applied).");

EditorGUI.BeginChangeCheck();

VisualEffectEditor.ShowHeader(EditorGUIUtility.TrTextContent("Update mode"), false, false);
bool newFixedDeltaTime = EditorGUILayout.Toggle(deltaTimeContent, initialFixedDeltaTime ?? false);
bool newExactFixedTimeStep = false;
EditorGUI.showMixedValue = !initialProcessEveryFrame.HasValue;
if (initialFixedDeltaTime.HasValue && initialFixedDeltaTime.Value || resourceUpdateModeProperty.hasMultipleDifferentValues)
newExactFixedTimeStep = EditorGUILayout.Toggle(processEveryFrameContent, initialProcessEveryFrame ?? false);
EditorGUI.BeginDisabledGroup((!initialFixedDeltaTime.HasValue || !initialFixedDeltaTime.Value) && !resourceUpdateModeProperty.hasMultipleDifferentValues);
newExactFixedTimeStep = EditorGUILayout.Toggle(processEveryFrameContent, initialProcessEveryFrame ?? false);
EditorGUI.EndDisabledGroup();
EditorGUI.showMixedValue = !initialIgnoreGameTimeScale.HasValue;
bool newIgnoreTimeScale = EditorGUILayout.Toggle(ignoreTimeScaleContent, initialIgnoreGameTimeScale ?? false);

Expand Down

0 comments on commit fe924b0

Please sign in to comment.