Introduction
Info Icon display various Icons depending on the settings you choose for the Icon Type. It connects to ResourceNode, ItemContainer and Crafter classes to display relevent information.
Info Icons should either have a UI Billboard attached or be a child of one to maintain rotation with the Camera.
Setting up
There is a prefab InfoIcon located in /prefabs/UI.
Setting up without the prefab is easy and just requires two Image components for the background and the Icon.
Settings
Icon Type
Icon will change depending on the Icon Type used –
Resource Type – Will display the same Icon as the first Resource in the List of Resources set on the ResourceNode.
Same As Container Type – If the ItemContainer is using specific types of items, use the first specific item icon.
Largest Item Amount – Adds up all the ItemAmounts in the ItemContainer and updates the icon with the item icon with largest amount.
Crafter Blueprint – Displays the Crafters current Blueprint, does not display anything in the queue.
Manual – Set your own icon, assign either a Crafter or ItemContainer to still use background color changes of the assigned depending on conditions.
Icon
Assign an Image component to display an Icon based on the Icon Type setting.
Background
Assign an Image component to change the background colour of the Image based on ItemContainer and Crafter triggers.
Valid Color
Change the color to display when ItemContainer and Crafter are in positive state.
Invalid Color
Change the color to display when ItemContainer and Crafter are in negative state.
Scripting
/// <summary>
/// Updates the icon depending on the iconType set
/// </summary>
public void RefreshIcon()