static void ParseAdditiveScenes() { string scenesPack; if (FindCommandArgument(QBCommandLineParameters.AdditiveScenes, out scenesPack)) { string[] scenes = QBCommandLineHelper.UnpackStringArray(scenesPack); LoadAdditiveScenes(scenes); } }
private string BuildCommandLineArguments(QBProfile editorProfile, QBPlayerSettings playerSettings, int instanceID) { StringBuilder sb = new StringBuilder(); AddCommandLineArgument(sb, QBCommandLineParameters.EnableQuickBuild); AddCommandLineArgument(sb, QBCommandLineParameters.InstanceID, instanceID); AddCommandLineArgument(sb, QBCommandLineParameters.Screen_FullscreenMode, editorProfile.advancedSettings.screenSettings.isFullScreen ? 1 : 0); int width, height; editorProfile.GetScreenSizeForInstance(instanceID, out width, out height); AddCommandLineArgument(sb, QBCommandLineParameters.Screen_Width, width); AddCommandLineArgument(sb, QBCommandLineParameters.Screen_Height, height); string outputLogFileName = string.Empty; if (!editorProfile.advancedSettings.redirectOutputLog) { outputLogFileName = editorProfile.BuildDirectoryPath + "/" + string.Format(QBCommandLineParameters.LogFileFormat, instanceID); AddCommandLineArgument(sb, QBCommandLineParameters.LogFile, outputLogFileName); } else { AddCommandLineArgument(sb, QBCommandLineParameters.RedirectOutput); } if (editorProfile.expertSettings.launchInBatchMode) { AddCommandLineArgument(sb, QBCommandLineParameters.Batchmode); AddCommandLineArgument(sb, QBCommandLineParameters.NoGraphics); } if (editorProfile.advancedSettings.displayInstanceID) { AddCommandLineArgument(sb, QBCommandLineParameters.DisplayInstanceID); } if (playerSettings.AdditiveScenes.Length > 0) { AddCommandLineArgument(sb, QBCommandLineParameters.AdditiveScenes, QBCommandLineHelper.PackStringArray(playerSettings.AdditiveScenes)); } if (instanceID < editorProfile.expertSettings.customInstanceDatas.Length) { QBInstanceData qbInstanceData = editorProfile.expertSettings.customInstanceDatas[instanceID]; if (qbInstanceData) { AddCommandLineArgument(sb, qbInstanceData.commandLineArguments); if (!string.IsNullOrEmpty(qbInstanceData.customName)) { AddCommandLineArgument(sb, QBCommandLineParameters.CustomName, qbInstanceData.customName); } } } AddCommandLineArgument(sb, editorProfile.advancedSettings.commandLineArguments); return(sb.ToString()); }