Example #1
0
        private void HandleCommandLineArguments()
        {
            if (!allowCommandLineArguments)
            {
                return;
            }

            string[] commandLineArguments = VRTK_SharedMethods.GetCommandLineArguements();

            for (int index = 0; index < commandLineArguments.Length; index++)
            {
                string argument     = commandLineArguments[index];
                string nextArgument = index + 1 < commandLineArguments.Length ? commandLineArguments[index + 1] : "";

                switch (argument)
                {
                case CommandLineArguments.Disable:
                    scaleRenderViewport = false;
                    break;

                case CommandLineArguments.MinimumRenderScale:
                    renderScaleLimits.minimum = float.Parse(nextArgument);
                    break;

                case CommandLineArguments.MaximumRenderScale:
                    renderScaleLimits.maximum = float.Parse(nextArgument);
                    break;

                case CommandLineArguments.MaximumRenderTargetDimension:
                    maximumRenderTargetDimension = int.Parse(nextArgument);
                    break;

                case CommandLineArguments.RenderScaleFillRateStepSizeInPercent:
                    renderScaleFillRateStepSizeInPercent = int.Parse(nextArgument);
                    break;

                case CommandLineArguments.OverrideRenderScaleLevel:
                    overrideRenderViewportScale      = true;
                    overrideRenderViewportScaleLevel = int.Parse(nextArgument);
                    break;

                case CommandLineArguments.DrawDebugVisualization:
                    drawDebugVisualization = true;
                    break;

                case CommandLineArguments.MSAALevel:
                    msaaLevel = int.Parse(nextArgument);
                    break;
                }
            }
        }