public static void AddCommand(IConsoleCommand command) { // Add Command s_ConsoleData.commands.Add(command.GetName().ToUpper(), command); // Add Aliases var aliases = command.GetAliases(); if (aliases != null) { foreach (var alias in aliases) { if (!alias.AliasString.Contains(" ")) { s_ConsoleData.aliases.Add(alias.AliasString.ToUpper(), alias.Command); } else { Debug.LogError(string.Format("Cannot add alias for command {0} : alias '{1}' contains spaces", command.GetName(), alias.AliasString)); } } } }