Unregister Commands

Unregister commands

Sometimes, you may want to unregister a command from Jahro, for instance, when it's no longer needed or when the related object instance has been destroyed. Jahro provides two methods to unregister commands:

Unregister Command by Name

The UnregisterCommand(string name); method allows you to unregister a command by its name:

Jahro.UnregisterCommand("my-command");

After calling this method, the command my-command will no longer be available in the Jahro console.

Unregister Command by Name and Group Name

The UnregisterCommand(string name, string groupName) method allows you to unregister a command by its name and group:

Jahro.UnregisterCommand("my-command", "MyGroup");

After calling this method, the command my-command in the group MyGroup will no longer be available in the Jahro console.