Ghost Commands
  • Getting Started
    • Quickstart
    • Syntax
      • Command syntax
      • Arguments with multiple values
    • Custom commands
  • Documentation
    • Commands
      • Static commands
      • Non-static commands
      • Dynamic commands
      • Overloads
      • Parameters
      • Additional attributes
    • Suggestions
      • Suggestion attributes
      • Suggestor methods
    • Converters
      • Custom parameter types
      • Using the ArgumentReader
      • Multiple ways to interpret an argument
    • Processors
      • Creating a processor
      • Setting priorities
      • Cheat codes example
    • Macros
    • Settings
    • Customization
    • Included Commands
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Commands

Overloads

Overloaded commands

Multiple commands can share the same name, provided that either the parameter types or number vary.

[Command]
public static void LoadScene(string name)
{
    SceneManager.LoadScene(name);
}

[Command]
public static void LoadScene(int buildIndex)
{
    SceneManager.LoadScene(buildIndex);
}

Based on the input when typing the argument, the command field will automatically select the first matching command.

Type Ambiguety

int parameters are prioritized higher than float parameters. To differentiate between them, you can put a decimal on your float values. The same principle applies to vectors.

PreviousDynamic commandsNextParameters

Last updated 7 months ago

Was this helpful?