Unity-DeveloperConsole
Unity-DeveloperConsole copied to clipboard
Feature Request: parameter autocompletion
Would be helpful and nice to have a command parameter autocompletion (like the command autocomplete). A way to use it could be to pass a list of values like in the example below.
Usage:
private static void ConfigureGiveCollectibleCommand()
{
DevConsole.AddCommand(Command.Create(
name: "collectible_give",
aliases: "",
helpText: "Gives collectibles to the player",
p1: Parameter.Create(
name: "collectible type",
helpText: "The collectible type to give to the player"
---> autocompletion: new List<CollectibleType>() { CollectibleType.Life, CollectibleType.Ammo, CollectibleType.Mana }
),
p2: Parameter.Create(
name: "amount",
helpText: "The amount you want to give to the player"
),
callback: (CollectibleType type, int amount) => GiveCollectible(type, amount)
));
}