public void ParseCommand(string command) { string[] args = command.Split(COMMAND_SEPARATORS); List <string> list = new List <string>(args); list.RemoveAll(item => item == ""); args = list.ToArray(); if (args.Length <= 1) { return; } bool is_command_exist = IsAnExistingCommand(args); if (!is_command_exist) { Debug.Log(command + " is invalid"); return; } KeyValuePair <string, System.Type>?pair = ParseCommandParameter(args); if (pair == null) { Debug.Log(command + " is invalid"); return; } m_commandLineInterpreter.InterpretCommand(args, pair.Value); }