Menu
Lumberyard
Legacy Reference

Associating Canvases with UI Flow Graph Nodes

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.

You must associate all UI flow graph nodes with a UI canvas. There are two sets of flow graph nodes for the UI: UIe and UI. The UIe set of flow graph nodes supersedes the now-legacy UI set of flow graph nodes.

In the UIe set of nodes, you assign a special entity to the node’s Choose Entity input using either the new Component Entity system or the legacy Entity system. These procedures are described in this section.

In the legacy UI set of nodes, the CanvasID comes from the UI:Canvas:Load node.

Using the Component Entity system to associate a UI canvas with a UIe flow graph node

  1. In the viewport, right-click and select Create Component Entity.

  2. Right-click the newly created component and click Flow Graph, Add.

    Enter a name for the flow graph, or leave it as Default.

  3. If the Flow Graph Editor is not yet open, click Tools, Flow Graph.

  4. In the viewport, right-click the component entity and select Flow Graph, Open, <flow graph name>.

  5. Select the newly created component entity. In the Entity Inspector, add a UI Canvas Asset Ref component and enter a path to the canvas you want to associate.

  6. In the Flow Graph Editor, in the flow graph you created, add any UIe flow graph node to the graph.

  7. Right-click the node you placed and do one of the following:

    • Click Assign graph entity if the canvas you want to reference is selected in the UI Canvas Asset Ref component.

    • Select a different entity and then click Assign selected entity to reference a different canvas.

      Note

      This other entity can be either a component entity with the UI Canvas Asset Ref component on it or a legacy entity that is a UiCanvasRefEntity.

Using the Legacy Entity system to associate a UI canvas with a UIe flow graph node

  1. In Lumberyard Editor's Rollup Bar, on the Objects tab, click Entity. Expand the UI folder and drag UiCanvasRefEntity into the viewport.

  2. Select the newly created UiCanvasRefEntity entity. In its Entity Properties, click CanvasPath and enter a path to the canvas you want to associate.

  3. In Lumberyard Editor, click Tools, Flow Graph.

  4. In the Flow Graph editor's Graphs pane, select a flow graph.

  5. Add any UIe flow graph node to the graph.

  6. Right-click the node you placed and do one of the following:

    • Click Assign graph entity if the flow graph is associated with the UiCanvasRefEntity.

    • If the flow graph you used is not associated with the UiCanvasRefEntity, make sure the UiCanvasRefEntity is selected in your viewport and then click Assign selected entity.

To associate a UI canvas with a legacy UI flow graph node

  1. Load a canvas in the Flow Graph editor. See Loading Canvases in the Flow Graph Editor for more information.

  2. Add any UI flow graph node to the graph.

  3. Connect the CanvasID output of the UI:Canvas:Load node to the CanvasID input of the new node.