Show / Hide Table of Contents

    Autocomplete

    Quantum console includes a contextual autocomplete system, that will provide suggestions as you type. By default, Quantum Console can suggest commands and their parameters, and for some argument types such as enums and GameObjects, Quantum Console will also suggest possible values.

    Bind Example

    Suggestions can either be selected by clicking on them in the popup display, or by cycling through them with the keyboard (default keys tab and shift tab).

    See here for creating your own custom suggestors.

    Suggestor Tags

    All suggestor tags are under the QFSW.QC.Suggestors.Tags namespace

    In some cases, general autocompletion rules may not be sufficient to get suggestions for your current input, especially for string arguments. Suggestor tags allow you to more explicitly specify which kind of suggestions you desire for a given argument. To use a suggestor tag, simply apply the tag's attribute to the parameter in the command declaration.

    See here for creating your own suggestor tags.

    Included Tags

    Suggestor Tag Description
    [Suggestions] Specifies a list of values to be suggested for the parameter
    [CommandName] Specifies that command name values should be suggested for the parameter
    [SceneName] Specifies that scene name values should be suggested for the parameter

    Examples

    The following command pick-color uses the [Suggestions] tag on the color argument col

    using QFSW.QC;
    using QFSW.QC.Suggestors.Tags;
    using UnityEngine;
    ...
    
    [Command("pick-color")]
    public static Color IsSceneLoaded(
        [Suggestions("red", "green", "blue")] Color col)
    {
        return col;
    }
    

    This causes Quantum Console to suggest red, green and blue for the argument as expected:

    Inline Suggestions

    The following command is-scene-loaded uses the [SceneName] tag on the string argument sceneName.

    using QFSW.QC;
    using QFSW.QC.Suggestors.Tags;
    using UnityEngine;
    using UnityEngine.SceneManagement;
    ...
    
    [Command("is-scene-loaded")]
    public static bool IsSceneLoaded([SceneName] string sceneName)
    {
        Scene scene = SceneManager.GetSceneByName(sceneName);
        return scene.isLoaded;
    }
    

    This causes Quantum Console to suggest scene names for the argument as expected:

    Scene Name Suggestions

    Quantum Console by QFSW
    Back to top