Editor/BuildSettings.cs
/// <summary>
/// Checks arguments and replaces with field values of any is passed.
/// </summary>
/// <param name="argumentsList">Argument list.</param>
/// <returns>Argument list with arguments replaced with relevant field values.</returns>
Checks arguments and replaces with field values of any is passed.
Checks arguments and replaces with field values of any is passed .
public string[] ParseArguments(IReadOnlyList<string> argumentsList)
        {
            var parsedArgs = new string[argumentsList.Count];
            for (var i = 0; i < argumentsList.Count; i++)
            {
                if (argumentsList[i][0] != '%')
                {
                    parsedArgs[i] = argumentsList[i];
                    continue;
                }
                const BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance |
                                           BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty;
                var arg = argumentsList[i].Remove(0, 1);
                var val = GetType().GetField(arg, flags).GetValue(this);
                parsedArgs[i] = val.ToString();
            }
            return parsedArgs;
        }
public string [ ] ParseArguments ( IReadOnlyList < string > argumentsList ) { var parsedArgs = new string [ argumentsList . Count ] ; for ( var i = 0 ; i < argumentsList . Count ; i ++ ) { if ( argumentsList [ i ] [ 0 ] != ' ' ) { parsedArgs [ i ] = argumentsList [ i ] ; continue ; } const BindingFlags flags = BindingFlags . Static | BindingFlags . NonPublic | BindingFlags . Instance | BindingFlags . Public | BindingFlags . GetField | BindingFlags . GetProperty ; var arg = argumentsList [ i ] . Remove ( 0 , 1 ) ; var val = GetType ( ) . GetField ( arg , flags ) . GetValue ( this ) ; parsedArgs [ i ] = val . ToString ( ) ; } return parsedArgs ; }
Checks arguments and replaces with field values of any is passed.
Checks arguments and replaces with field values of any is passed .
Argument list with arguments replaced with relevant field values.
Argument list with arguments replaced with relevant field values .
argumentsList
IReadOnlyList<string>
None