The complete RPG Engine for Unity
Learn more about displaying status values in your HUDs (and other UI).
Displaying a list of status values usually uses a UI setup of a status value. The actual setup depends on the used UI module, e.g. the Unity UI module will use a prefab for this.
You can set up different UI setups by using UI keys. The default UI setup (without key) is used if no matching key is found. This allows you to have differently styled status values in parts of the UI. E.g. a player HUD could show a value bar, while a stats menu could just display names and values.
The default setup for all status values can be found in the Makinom editor in UI > UI Settings in the ORK UI Settings > HUD Settings > Default Status Value UI settings.
Each individual status value (Status > Status Values) can override the default settings with custom settings in UI Settings > Custom Status Value UI.
The Unity UI module displaysstatus values using HUD components.
Display text content information (e.g. name, values, etc.) using ORK HUD Status Text Content components. Use the Status Value status type, see the HUD text content documentation for details.
You can also display value bars using ORK HUD Value Bar Content or ORK HUD Icon Bar Content components. Use the Status Value value type, see the HUD value bar content documentation for details.
For a practical setup, check out the Unity UI simple player HUD tutorial.
Use a HUD Status Value List component to add multiple status values.
The component creates a status value using it’s Status Value UI setup. You can optionally also use a defined prefab instead of the status value’s UI.
The prefab (coming from status value UI or a defined prefab) requires a HUD Content Provider component at it’s root. The HUD Status Value List component sets the content provider’s user (content) as the individual status values. The content provider further distributes the information to any content component on it.
You can use layout components to arrange the listed status values. E.g. use a Vertical Layout Group component to arrange the status values in a vertical list. See Unity’s documentation on UI setup and layout groups for details on this.
The context menu in the scene hierarchy has quick setup commands for status value lists: ORK Framework > HUD > Status Value > Status Value List (variants with and without layout groups)
The HUD Status Value List component requires a combatant as displayed content.
Use a HUD Status Value component to display a single, defined status value. The component itself is a HUD Content Provider and doesn’t create a prefab of the displayed status value.
Use this component if you don’t want to go through prefab creation and Status Value UI setup and just display a status value’s content directly. Displaying the content uses ORK HUD Status Text Content and ORK HUD Value/Icon Bar Content components, which reference the HUD Status Value component as their content provider.
The context menu in the scene hierarchy has quick setup commands for single status values: ORK Framework > HUD > Status Value > Status Value (single) (variants with name, value and value bar content)
The HUD Status Value component requires a combatant as displayed content.
Status values use prefabs for their Status Value UI setup. Other parts of the UI use the Status Value UI setup to create individual status values.
The prefab requires a HUD Content Provider component at it’s root. Displaying the content uses ORK HUD Status Text Content and ORK HUD Value/Icon Bar Content components, which reference the HUD Content Provider component as their content provider.
Listing multiple status values will often use layout groups to organize them. You can use a Layout Element component to define the prefab’s preferred width or height.
The context menu in the scene hierarchy has quick setup commands for status value prefabs: ORK Framework > HUD > Status Value > Status Value (for prefabs) (variants with name, value and value bar content)
The Status Value UI uses prefabs for creating the UI. The root of the prefab needs a HUD Content Provider component.
See the For Prefabs setup above for details.
© 2015 Gaming is Love e.U.
Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!