API ReferenceGE Extensionsflowgraphnodesui
Show Editor (Flowgraph Node)
- **Node Name:** `Show Editor`
Overview
- Node Name:
Show Editor - Category:
once_instant - File:
extensions/flowgraph/nodes/ui/hideEditor.lua
Shows or hides the World Editor. Despite the filename hideEditor, the node is named "Show Editor" and accepts a boolean to control visibility.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
value | bool | If the editor should be visible (true) or hidden (false) |
Internals
Key Methods
| Method | Description |
|---|---|
workOnce() | Stores the desired visibility state in self._doHide |
_afterTrigger() | Applies the editor visibility if it differs from current state |
Deferred Execution
The node defers the actual editor toggle to _afterTrigger() rather than doing it in workOnce(). This ensures the editor state change happens after the current flowgraph trigger pass completes, avoiding potential issues with the editor interfering with flowgraph execution.
How It Works
workOnce()readsvalueand stores it.- After the trigger pass,
_afterTrigger()checks ifeditor.activediffers from the desired state. - If different, calls
editor.setEditorActive(value)to toggle.
Usage Example
-- Show the world editor:
editor.setEditorActive(true)
-- Hide the world editor:
editor.setEditorActive(false)
-- In a flowgraph, connect a Bool provider to the value pin
-- to control editor visibility based on game logic.Key Dependencies
editor.active- current editor visibility stateeditor.setEditorActive()- toggles the World Editor
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide