list-treePerk Tree UI

The Perk Tree UI is where most of the magic happens for your tree.

Tree Source

This is where you set whether the UI will display a single Tree, multiple trees, or a manually set up tree (Manual Nodes option). If using a Tree Selector component, the fields below the dropdown will be automatically set up during runtime. Otherwise you can manually set them.

Runtime Node Spawning

You'll want this bool selected if you aren't manually setting up trees; it will take the data from your Tree Editor and instantiate the given prefabs for the nodes at runtime, parenting them to the selected Node Parent.

Runtime Connections from Trees

Make sure this bool is enabled if not building manual trees, it will automatically connect nodes at runtime based on your design in the Perk Tree Editor. The connections parent is the object that will parent all the instantiated ConnectionUI objects.

Tree Spacing is only used when "Multiple Trees" (above) is selected.

Target

The Perk Holder GameObject to display data for.

Nodes

This list only needs to be added to if you're building manual trees. Otherwise it will be populated at runtime with associated instantiated nodes.

Hovercard

The Hovercard displays further information about a Perk from a hovered or selected Node.

Auto Hide will automatically hide the Hovercard when there's nothing to display.

Hover Start denotes how the Hovercard object will start when the Perk UI menu is opened. It's options are:

  • Hide | The Hovercard will simply be hidden at the start.

  • Placeholder | Show a Placeholder gameObject (usually a copy of the hovercard with dummy data such as "Select a Perk" in the description).

  • First Node | Show the first Node in the Perk Tree's data.

Messages

Here you can drag in a reference to whatever gameobject you want Messages (if any) to display on. It will look for TextMeshPro objects and change the text to the related message (such as "Successfully unlocked {perk}!".

Instructions Lists

On Purchase will run when a perk is successfully purchased, and its Message will show. Note you can use {perk} and it will substitute the name of the selected perk at runtime.

On Cannot Purchase (invalid Points) will run if a Perk is attempted to be learned but there are not enough points to purchase it.

On Cannot Purchase (invalid Requirements) will run if a Perk is attempted to be learned but the requirements are not yet met. Note that adding {error} into the message will describe the reason for being unable to unlock that perk.

Last updated