The simple tool wrapper will create, bind and manage the lifecycle of all the desired components. The wrapper is designed to obfuscate and simplify the process of creating a simple editor tool so that a creator can get on with the job of just creating the tool functionality without getting mired in the irrelevant details of component lifecycle and visibility management. The wrapper will also attempt to codify particular implementation patterns and requirements that are common to all editor tools, and enforce them in a consistent way. It should also go some way to insulating the creator from underlying system and implementation changes as the editor evolves.

interface ISimpleTool {
    get menu(): IMenu;
    get name(): string;
    get pane(): ISimpleToolPaneComponent;
    get session(): IPlayerUISession<Record<string, never>>;
    get statusBar(): ISimpleToolStatusBarComponent;
    get toolRail(): ISimpleToolRailComponent;
    findPane(idString: string): ISimpleToolPaneComponent;
    hidePane(idString?: string): void;
    logDebug(message: string): void;
    logError(message: string): void;
    logInfo(message: string): void;
    logWarn(message: string): void;
    showPane(idString?: string): void;
    showPaneExclusively(idString: string): void;
    teardown(): void;
}

Accessors

  • Beta

    Returns IMenu

    Get a reference to the menu component that was automatically created for the tool This generally only happens if the tool is a global tool (i.e. has a pane and does not have a tool rail component) In this case a menu item is automatically created and some visibility controls are inserted. If you have additional menu options you want to add, this is the ideal control to add children to

  • get name(): string
  • Beta

    Returns string

    Get the tool name

  • get session(): IPlayerUISession<Record<string, never>>
  • Beta

    Returns IPlayerUISession<Record<string, never>>

    Get a reference to the IPlayerUISession. This is the primary interface to the editor UI and all of the editor extension controls

Methods

  • Beta

    Parameters

    • OptionalidString: string

    Returns void

    Hide a particular pane or subpane by it's unique ID. If no ID is provided (or cannot be found) the function will throw an error Although the parent pane is used to execute the visibility request, the hidePane function will NOT affect the visibility of any sibling panes -- so it is possible to hide all of the child panes of a parent using this function

  • Beta

    Parameters

    • message: string

    Returns void

    Send a tagged Debug log message to the console. The tag will contain the tool name

  • Beta

    Parameters

    • message: string

    Returns void

    Send a tagged Error log message to the console. The tag will contain the tool name

  • Beta

    Parameters

    • message: string

    Returns void

    Send a tagged Informational log message to the console. The tag will contain the tool name

  • Beta

    Parameters

    • message: string

    Returns void

    Send a tagged Warning log message to the console. The tag will contain the tool name

  • Beta

    Parameters

    • OptionalidString: string

    Returns void

    Show a particular pane or subpane by it's unique ID. If no ID is provided (or cannot be found) the function will throw an error Note that the showPane function (when used with a child pane) will use the parent pane to execute the visibility request. In this case, if the child panes are marked as mututally exclusive, then the siblings of the requested pane will be hidden

  • Beta

    Parameters

    • idString: string

    Returns void

    Much like the showPane function, but will hide all other panes that are not the requested pane irrespective of the exclusivity setting

  • Beta

    Returns void

    A teardown function implemented by the ISimpleTool implementation, and is called by the system during editor extension shutdown. Don't override this function - instead, implement the onTeardown event in the ISimpleToolOptions structure