network-wiredThe Perk Tree Asset

To create a Perk Tree, navigate to your Project window, right click and go to Create > Game Creator > Perks > Perk Tree.

To properly visualize editing of the Perk Tree, go to the top toolbar and select Game Creator > Perks > Perk Tree Editor to open a custom dockable editor window. This allows you to quickly and easily edit your tree visually!

Working with the Editor

To start editing a Tree, navigate to the top left of the Perk Tree Editor toolbar and select a Tree.

The red rectangle denotes Pan Limits (see below).

The blue rectangle is your canvas (you'll want to set this to the same size as the canvas you want to use in-game). It has a couple of preset sizes, or you can set your own.

You can drag Perks directly into the editor window to add them as Nodes to your tree, or right click anywhere and select Add Node. There's also a button at the top right inside the toolbar.

To make a connection between Nodes, drag out from one port and into another port. This will create a connection line that can then be further interacted with.

Right click a Node or connection to view its context menu. Here you can duplicate nodes, delete them, add elbows to connections, make it a curved line, or delete it.

Elbows can be selected and deleted using the right click context menu as well.

Drag a box around multiple nodes, connections and elbows to move them all at once.

Identity

ID is the unique ID for this tree.

Display Name is the name of the tree that will be displayed in UI fields.

Sprite is the Icon that will be displayed if hooked up to UI fields.

Description is an optional basic description to go with the tree.

Runtime Settings

Node Prefab is the UI prefab that the tree will instantiate for each Node in the tree. See Perk Node UI for more details on setting up a Node prefab.

Min and Max Zoom are the minimum and maximum limits for Zooming within the Tree UI. You can tweak these until they feel right to you or your tree setup.

Pan Extents (visualized by the red square outline in the Editor)

Editor Visual Settings

Grid Size changes the look of the grid in the editor window.

Node Size is mainly for reference, and should be the same size as your Node prefabs RectTransform. This allows you to better visualize how the tree will look with accurate sized nodes.

Initial View Position and Initial View Size represent the canvas size (the position doesn't really matter too much here) of the shown tree. This should match the size of the canvas you're displaying in-game. The canvas area is represented by the blue box.

Nodes & Edges

Everything in this section is set up automatically when Nodes or Connections are created, but you can override settings for specific ones here if necessary.

Connection Visual Settings

This area contains all the settings for customizing your connection lines between Nodes.

Thickness represents the thickness of the line sprite.

Default Sprite and Default Material are the defaults that will be used if overrides for each section (Locked, Available, Active) are not set. Note that if nothing is set for defaults, the internal default is a default-line.png sprite in the Resources folder, and no material is applied.

Each section below allows you to override specific settings for how lines will be displayed based on what their current status is.

Locked is shown when the path to that node is unavailable (requirements not met).

Available will be shown when the requirements for that path are met, but the Perk it leads to isn't unlocked or upgraded yet.

Active is what will be shown when the node the path comes from and goes to are unlocked (if the Requirement Tier option, see below, is also sufficient).

Reorder On State Change will rearrange the connections in the hierarchy so Active connections show above Available and Locked, and Available shows above Locked. This is just a visual setting and doesn't actually affect the connection path.

Required Tier is the tier required for the to-Node for it show its Active connection status.

Last updated