Skip to content

Commit fe924b0

Browse files
PaulDemeulenaereGitHub Enterprise
authored andcommitted
Fix serveral minor issues (#103)
Fix issue #1131 (comment) Fix issue #1131 (comment) Fix issue #1131 (comment)
1 parent 15df881 commit fe924b0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

com.unity.visualeffectgraph/Editor/Inspector/VFXAssetEditor.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,18 +446,19 @@ public override void OnInspectorGUI()
446446
}
447447

448448
EditorGUI.showMixedValue = !initialFixedDeltaTime.HasValue;
449-
var deltaTimeContent = EditorGUIUtility.TrTextContent("Fixed Delta Time", "If enabled, use visual effect manager fixed delta time mode.");
450-
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.");
451-
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).");
449+
var deltaTimeContent = EditorGUIUtility.TrTextContent("Fixed Delta Time", "If enabled, use visual effect manager fixed delta time mode, otherwise, use the default Time.deltaTime.");
450+
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.");
451+
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).");
452452

453453
EditorGUI.BeginChangeCheck();
454454

455455
VisualEffectEditor.ShowHeader(EditorGUIUtility.TrTextContent("Update mode"), false, false);
456456
bool newFixedDeltaTime = EditorGUILayout.Toggle(deltaTimeContent, initialFixedDeltaTime ?? false);
457457
bool newExactFixedTimeStep = false;
458458
EditorGUI.showMixedValue = !initialProcessEveryFrame.HasValue;
459-
if (initialFixedDeltaTime.HasValue && initialFixedDeltaTime.Value || resourceUpdateModeProperty.hasMultipleDifferentValues)
460-
newExactFixedTimeStep = EditorGUILayout.Toggle(processEveryFrameContent, initialProcessEveryFrame ?? false);
459+
EditorGUI.BeginDisabledGroup((!initialFixedDeltaTime.HasValue || !initialFixedDeltaTime.Value) && !resourceUpdateModeProperty.hasMultipleDifferentValues);
460+
newExactFixedTimeStep = EditorGUILayout.Toggle(processEveryFrameContent, initialProcessEveryFrame ?? false);
461+
EditorGUI.EndDisabledGroup();
461462
EditorGUI.showMixedValue = !initialIgnoreGameTimeScale.HasValue;
462463
bool newIgnoreTimeScale = EditorGUILayout.Toggle(ignoreTimeScaleContent, initialIgnoreGameTimeScale ?? false);
463464

0 commit comments

Comments
 (0)