Editor/BuildSettingsEditor.cs
/// <summary>
/// Draws the help boxes. Has an option to "compile" the batch file.
/// </summary>
/// <param name="batchFile">Batch file to be executed</param>
Draws the help boxes. Has an option to "compile" the batch file.
Draws the help boxes . Has an option to " compile " the batch file .
private void DrawHelp(Object batchFile)
        {
            _help = EditorGUILayout.Foldout(_help, "Help");
            if (!_help)
                return;
            EditorGUILayout.HelpBox(
                $"Arguments to pass to the batch file.\nFirst argument will be used instead %1 in the '{batchFile.name}.bat' file, second for %2 etc.\nTo use BuildSettings fields as arguments add % sign before (e.g. %zipFile to pass the path of the zip file)",
                MessageType.Info);
            _arguments = EditorGUILayout.Foldout(_arguments, "Available Arguments");
            if (_arguments)
            {
                EditorGUILayout.HelpBox("%buildName\n%directory\n%buildGroup\n%buildTarget\n%scenes\n%batchFile\n%batchArguments\n%createZipFile\n%useBatchFile\n%keepCurrentBuildTarget\n%zipFile\n%buildDirectory",
                    MessageType.None);
            }
            EditorGUILayout.Space();
            if (!string.IsNullOrEmpty(_compiledBatchFile))
            {
                EditorGUILayout.LabelField($"Final '{batchFile.name}.bat' file:");
                EditorGUILayout.HelpBox(_compiledBatchFile, MessageType.None);
            }
            if (GUILayout.Button(string.IsNullOrEmpty(_compiledBatchFile) ? "Compile" : "Recompile"))
            {
                _compiledBatchFile = CompileBatFile(batchFile,
                    target.GetType().GetField("batchArguments", _flags).GetValue(target) as string[]);
            }
        }
private void DrawHelp ( Object batchFile ) { _help = EditorGUILayout . Foldout ( _help , " " ) ; if ( ! _help ) return ; EditorGUILayout . HelpBox ( $" Arguments to pass to the batch file. \n First argument will be used instead %1 in the ' { batchFile . name } .bat' file, second for %2 etc. \n To use BuildSettings fields as arguments add % sign before (e.g. %zipFile to pass the path of the zip file) " , MessageType . Info ) ; _arguments = EditorGUILayout . Foldout ( _arguments , " " ) ; if ( _arguments ) { EditorGUILayout . HelpBox ( " \n \n \n \n \n \n \n \n \n \n \n " , MessageType . None ) ; } EditorGUILayout . Space ( ) ; if ( ! string . IsNullOrEmpty ( _compiledBatchFile ) ) { EditorGUILayout . LabelField ( $" Final ' { batchFile . name } .bat' file: " ) ; EditorGUILayout . HelpBox ( _compiledBatchFile , MessageType . None ) ; } if ( GUILayout . Button ( string . IsNullOrEmpty ( _compiledBatchFile ) ? " " : " " ) ) { _compiledBatchFile = CompileBatFile ( batchFile , target . GetType ( ) . GetField ( " " , _flags ) . GetValue ( target ) as string [ ] ) ; } }
Draws the help boxes.
Draws the help boxes .
batchFile
Object
Batch file to be executed
Batch file to be executed