Skip to content

Commit

Permalink
fix(AdaptiveQuality): ensure debug visualization moves with headset
Browse files Browse the repository at this point in the history
The debug visualization was not correctly parented to the headset. This
change makes sure to only attach at the appropriate moment to fix the
problem.
  • Loading branch information
Christopher - Marcel Böddecker committed Jan 20, 2017
1 parent caf2f3c commit 228cf63
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Assets/VRTK/Scripts/Utilities/VRTK_AdaptiveQuality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ private void OnValidate()
maximumRenderTargetDimension = Mathf.Max(2, maximumRenderTargetDimension);
renderScaleFillRateStepSizeInPercent = Mathf.Max(1, renderScaleFillRateStepSizeInPercent);
msaaLevel = msaaLevel == 1 ? 0 : Mathf.Clamp(Mathf.ClosestPowerOfTwo(msaaLevel), 0, 8);

CreateOrDestroyDebugVisualization();
}

private void Update()
Expand Down Expand Up @@ -393,7 +391,6 @@ private void HandleCommandLineArguments()
break;
case CommandLineArguments.DrawDebugVisualization:
drawDebugVisualization = true;
CreateOrDestroyDebugVisualization();
break;
case CommandLineArguments.MSAALevel:
msaaLevel = int.Parse(nextArgument);
Expand All @@ -412,7 +409,6 @@ private void HandleKeyPresses()
if (Input.GetKeyDown(KeyboardShortcuts.ToggleDrawDebugVisualization))
{
drawDebugVisualization = !drawDebugVisualization;
CreateOrDestroyDebugVisualization();
}
else if (Input.GetKeyDown(KeyboardShortcuts.ToggleOverrideRenderScale))
{
Expand Down

0 comments on commit 228cf63

Please sign in to comment.