Menu
Lumberyard
Legacy Reference

UI Canvas Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

The UI Canvas flow graph nodes have been superseded by the UIe Canvas flow graph nodes. For best results, use the UIe Canvas flow graph nodes.

You can use these flow graph nodes to perform actions on a UI canvas.

UI:Canvas:ActionListener Node

Listens for the specified action on a UI canvas.

Node Inputs

Activate

Initiates listening for the specified action.

CanvasID

Unique ID of the canvas to listen to.

ActionName

Name of the action to listen for.

Node Outputs

OnAction

Triggers when the canvas sends the action.

ElementID

ID of the UI element that triggered the action.

UI:Canvas:Load Node

Loads the specified UI canvas.

Node Inputs

Activate

Loads the canvas.

CanvasPathname

Path of the canvas to load.

Disabled

Sets whether canvas is disabled initially. If disabled, the canvas is not updated or rendered.

Node Outputs

OnLoad

Sends a signal when the canvas is loaded.

CanvasID

Outputs the unique canvas ID when the canvas is loaded.

UI:Canvas:Unload Node

Unloads the specified canvas.

Node Inputs

Activate

Unloads the canvas.

CanvasID

Unique ID of the canvas to unload.

Node Output

Done

Sends a signal when the node's action is finished.

UI:Canvas:FindLoaded Node

Finds the canvas ID for the UI canvas file path.

Node Inputs

Activate

Finds the canvas using the UI canvas file path.

CanvasPathname

Path of the canvas to find.

Node Outputs

CanvasID

The ID of the canvas that was found (if it was found).

Found

True if the canvas was found; otherwise, false.

UI:Canvas:GetKeepLoaded Node

Gets the Boolean value of whether the canvas stays loaded when a level is unloaded.

Node Inputs

Activate

Gets whether the canvas stays loaded when the level is unloaded.

CanvasID

Unique ID of the canvas to keep loaded.

Node Output

KeepLoaded

The Boolean value of whether the canvas stays loaded if the level is unloaded. True if the canvas should stay loaded during level unload; otherwise, false.

UI:Canvas:SetKeepLoaded Node

Determines whether the canvas stays loaded when a level is unloaded.

Node Inputs

Activate

Sets whether the canvas stays loaded when the level is unloaded.

CanvasID

Unique ID of the canvas to keep loaded.

KeepLoaded

If true, causes the canvas to stay loaded when the level is unloaded.

Node Output

Done

Sends a signal when the node's action is finished.

UI:Canvas:GetDrawOrder Node

Gets the integer draw order value for a UI canvas with respect to other UI canvases.

Node Inputs

Activate

Gets the draw order for the canvas.

CanvasID

Unique ID of the canvas to get the draw order from.

Node Output

DrawOrder

Order in which the canvas draws. Higher numbers appear before lower numbers.

UI:Canvas:SetDrawOrder Node

Sets the draw order for a UI canvas with respect to other UI canvases.

Node Inputs

Activate

Sets the draw order for the canvas.

CanvasID

Unique ID of the canvas whose draw order you are setting.

DrawOrder

Order in which to display the canvas. Higher numbers appear before lower numbers.

Node Output

Done

Sends a signal when the node's action is finished.

UI:Canvas:GetIsPixelAligned Node

Gets the boolean value of whether the canvas is pixel-aligned.

Node Inputs

Activate

Gets whether visual element's vertices should snap to the nearest pixel.

CanvasID

Unique ID of the canvas.

Node Output

IsPixelAligned

Boolean value. True if the visual element's vertices should snap to the nearest pixel; otherwise, false.

UI:Canvas:SetIsPixelAligned Node

Sets whether visual element's vertices should snap to the nearest pixel.

Node Inputs

Activate

Sets the pixel-aligned property for the canvas ID.

CanvasID

Unique ID of the canvas to receive the pixel-aligned property value.

IsPixelAligned

Boolean value that represents whether a visual element's vertices should snap to the nearest pixel.

Node Output

Done

Sends a signal when the node's action is finished.

UI:Canvas:GetEnabled Node

Gets the boolean enabled flag of the canvas. Enabled canvases are updated and each frame rendered.

Node Inputs

Activate

Gets the enabled flag of the canvas.

CanvasID

Unique ID of the canvas to obtain the enabled flag from.

Node Output

Enabled

The enabled flag of the canvas. True if enabled; otherwise, false.

UI:Canvas:SetEnabled Node

Sets whether the canvas is enabled. Enabled canvases are updated and each frame rendered.

Node Inputs

Activate

Sets the enabled flag of the canvas.

CanvasID

Unique ID of the canvas to obtain the enabled flag from.

Enabled

True if the canvas should be enabled; otherwise, false.

Node Output

Done

Sends a signal when the node's action is finished.