using System.Collections.Generic; using UnityEngine; namespace UltraCombos { class Misc { static List commandLineArgs = null; public static bool GetCommandLineArgument(string arg) { string input; return GetCommandLineArgument(arg, out input); } public static bool GetCommandLineArgument(string arg, out string input) { if (commandLineArgs == null) { commandLineArgs = new List(); string[] args = System.Environment.GetCommandLineArgs(); commandLineArgs.AddRange(args); } bool res = false; input = ""; if (commandLineArgs.Contains(arg)) { res = true; int index = commandLineArgs.FindIndex( delegate (string argument) { return (argument == arg); }); if (index > -1) { index++; if (index < commandLineArgs.Count) input = commandLineArgs[index]; } } return res; } public static void Verbose(string module, string msg, int level = 0) { msg = string.Format("[{0}] {1}", module, msg); switch (level) { case 0: Debug.Log(msg); break; case 1: Debug.LogWarning(msg); break; case 2: Debug.LogError(msg); break; } } } }