ORK Framework Logo - RPG Editor for Unity
  • ORK 4 BETA
  • Features
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

ORK 4 Documentation

  • Getting Started
    • Welcome
    • First Steps (Unity)
  • Features
    • The Status System
    • Schematics
    • Schematic Nodes
    • Dialogue Importer
    • Variables
    • Selected Data
  • Components
    • Battle Components
    • Combatant Components
    • Control Components
    • Cursor Prefab Components
    • Game Starters
    • Interactable Components
    • Move AI Components
    • Scene Setup Components
  • Editor
    • The ORK 4 Editor
    • Sections & Sub-Sections
    • Node Editor
    • Schematic Editor
    • Asset Sources
    • Unity Overlay Toolbar
  • Section: System
    • System Settings
    • Languages
    • Organizer Types
    • Game States & Conditions
    • General Condition Templates
    • Object Pools
    • Prefab Savers
    • Scene Connections
  • Section: Controls
    • Game Controls
    • Interaction Settings
    • Player Controls
    • Camera Controls
    • Input Keys
    • Control Maps
    • Camera Positions
    • Battle Camera
  • Section: Gameplay
    • Game Settings
    • Formulas
    • Difficulties
    • Shortcut Slots & Settings
    • Custom Settings & Global Custom Settings
    • Global Machines
    • Machine Templates
  • Section: Status
    • Status Values
    • Status Effects
    • Attack Modifiers
    • Defence Modifiers
    • Abilities & Ability Developments
    • Status Developments
    • Research Trees
    • Damage Types
    • Status Bonuses & Templates
    • Status Condition Templates
  • Section: Inventory
    • Inventory Settings
    • Inventory Containers
    • Currencies
    • Items
    • AI Rulesets
    • Crafting Recipes
    • Equipment Slots & Slot Set Templates
    • Equipment & Available Equipment Templates
    • Shops
    • Loot
  • Section: Combatants
    • Combatants
    • Combatant Groups
    • Class Slots
    • Classes
    • Factions & Faction Benefits
    • Animations
    • Move AIs
    • Formations
    • Action Combos
  • Section: Battles
    • Battle Systems
    • Turn Based Battles
    • Active Time Battles
    • Real Time Battles
    • Phase Battles
    • Battle Spots
    • Battle AIs
    • Battle Actions Settings
    • Special Commands Settings
    • Target Settings
    • Target Selection Templates
    • Battle Range Templates
    • Battle Grid Settings
    • Battle Grid Highlights
    • Battle Grid Cell Types
    • Battle Grid Formations
  • Section: Content
    • Content Types
    • Music
    • Sound Templates
    • Areas
    • Teleports
    • Quests & Quest Tasks
    • Logs & Log Texts
    • Object Contents
  • Section: UI
    • UI Settings
    • UI Layers
    • UI Layouts
    • UI Boxes
    • HUDs
    • Notifications
    • Cursor Settings
  • Section: Menus
    • Start Menu
    • Save Game Settings
    • Option Categories
    • Menu Screens
    • Menu Requirements
    • Battle Menus
    • Loot Dialogues
    • Item Collection
    • Combatant Selections
    • Quantity Selections
    • Shop Layouts
  • Section: Texts
    • Text Settings
    • Formatting Settings
    • Flying Texts
    • Use Cost Display
    • Status Preview Display
    • Bonus Display
    • Status Change Display
    • Console Settings & Console Types
    • Text Codes
  • Sections: Editor
    • Editor Settings
    • Backups
    • Variables
    • Plugins
  • Scripting
    • Access Handler
    • Custom Nodes
    • Custom Save Data
    • Custom Component Save Data

ORK 4 Tutorials

  • ORK 4 Unity Quickstart Tutorials (3D)
    • ORK 4 Unity Quickstart 3D
    • 01 Initial ORK Setup
    • 02 Player Setup
    • 03 Music & Scenes
    • 04 UI System Setup
    • 05 UI Boxes
    • 06 Flying Texts
    • 07 Status Values
    • 08 Status Effects
    • 09 First Abilities
    • 10 Fighter Setup
    • 11 First Enemies & Battle AI
    • 12 Battle System Setup
    • 13 Animating Battle Start and End
    • 14 Random Battles
    • 15 Animating Actions
    • 16 Player Battle HUD
    • 17 Elemental Attacks
    • 18 Animating More Actions
    • 19 Inventory & Loot
    • 20 Equipment
    • 21 Loot, Start Equipment & Viewers
    • 22 Magic Abilities
    • 23 Caster Setup
    • 24 More Enemies
    • 25 Start Menu & Save Games
    • 26 Menu Screens
    • 27 Interactions
    • 28 Item Collectors
    • Quickstart Extended
  • Battle Tutorials
    • Adding Active Time Battles
    • Adding Phase Battles
    • Hit & Miss
    • Critical Hits
    • Cast Time
    • Grid 01: Battle Grid Setup
    • Grid 02: Highlights
    • Grid 03: Cell Types
    • Grid 04: Move Command
    • Grid 05: Scene Grid Setup
    • Grid 06: Battle Ready
    • Grid 07 Use & Affect Ranges
    • Grid 08: Better Camera Control
  • Gameplay Tutorials
    • Multiple Interaction Controllers
    • Player Group Spawn & Follow
    • Spawn Hunting Enemies
    • Gamepad Controls (Unity Input System)
    • Combined Inputs
    • Quests 01: Menu Screen
    • Quests 02: Hunting
    • Quests 03: Collect Potion Materials
    • Quests 04: Collect Equipment Materials
    • Quests 05: Quest Mark HUDs
    • Crafting 01: Menu Screen
    • Crafting 02: Materials & Recipes
    • Crafting 03: Getting Materials
    • Crafting 04: Proficiency & Critical Outcome
    • Shop
    • Inventory Containers
  • Schematics Tutorials
    • UI Animation Schematics
    • Flying Text Animation Schematics
    • HUD Conditional Schematics
  • UI Tutorials
    • Unity UI: Initial Setup
    • Unity UI: Status Value UI Setup
    • Unity UI: Status Effect UI Setup
    • Unity UI: Shortcut UI Setup
    • Unity UI: Dragging Notification
    • Unity UI: Interaction HUD
    • Unity UI: Shortcut HUD
    • Unity UI: Turn Order HUD
    • Unity UI: Cast Time HUD
    • Unity UI: Quest HUD
    • Unity UI: Tooltip HUD
    • Unity UI: Move Range HUD

ORK 4 Extensions

  • Plugins
    • Save Game Compression Plugin
  • Schematic Nodes
    • Footstepper Nodes (Unity)
  • Scripts
    • A* Pathfinding Movement Component (Unity)
    • PolyNav 2D Movement Component (Unity)
    • Cinemachine Camera Control Type (Unity)
    • Rewired Input Key (Unity)
    • Unity Legacy Input Key (Unity)
    • Core GameKit Wrapper (Unity)
    • Pool Boss Wrapper (Unity)
View Categories
  • Guide
  • ORK 4
  • ORK 4 Tutorials
  • UI Tutorials

Unity UI: Quest HUD

In this tutorial we’ll set up a Quest type HUD.

The quest HUD will display the player’s active quests.

This tutorial is based on the ORK 4 Unity Quickstart 3D tutorials using the quest mini-series for quest content, but can be used in any project.

Your project’s UI system should already be set to Unity UI. If not, check the initial setup tutorial for Unity UI.

We’ll create our quest HUD using prefabs – we’ll have to set up 4 prefabs for this:

  • Quest HUD
    The actual HUD, which lists the quests.
  • Quest
    The individual quest, which lists the quest’s tasks.
  • Quest Task
    The individual quest task, which lists the task’s requirements.
  • Quest Task Requirement
    The individual quest task requirement (e.g. kill X enemies, collect Y items, etc.)

We’ll create the prefabs in reverse order, i.e. starting with the quest task requirement and ending with the actual quest HUD’s prefab. This is due to using the prefabs in the previous prefab, e.g. the requirement prefabs are used by the task prefabs to list the requirements.

This might sound more complicated than it actually is, since we’ll create ready to use setups (using the ORK toolbar or scene hierarchy context menu), which we just have to adjust to our needs and style.

Quest Task Requirement Prefab #

First, we’ll create the prefab for the quest task requirements. A requirement is something that’s needed to complete a quest task, e.g. killing X number of a defined enemy or collecting Y number of a defined item, etc.

We create a ready to use setup using the scene hierarchy’s context menu (ORK Framework > HUD > Quest > Prefab: Quest Task Requirement) or ORK toolbar (search for: Quest Task Requirement Prefab).

The size and placement of the object doesn’t matter. The prefab we’ll create out of it will be placed in the HUD using a Vertical Layout Group, which controls these parameters.

HUD Text Content #

This component manages the text content and which types of requirements are displayed. We’ll keep the default setup, only adjusting the text to show the requirement’s name, count and max count.

  • Text
    Set to: <name> <count>/<countmax>

Image Size (Optional) #

In case you’re using large icons, you might want to adjust the size when displayed in the quest HUD.

For this, add a Layout Element component to the Image child object using the component menu.

  • Preferred Width
    Enable
    Set the value to the width you want, e.g. 30.
  • Preferred Height
    Enable
    Set the value to the height you want, e.g. 30.

Text Styling #

The TextMeshPro – Text (UI) component on the Text child object is responsible for displaying the text.

This is where you can change the font, font size, font color, etc.

I’m using font size 16.

Adding a value bar (Optional) #

We’ll can also add a value bar to display the requirement’s count.

Select the Quest Task Requirement object and either use the context menu (ORK Framework > HUD > Content > HUD: Value Bar (Sprite)) or ORK toolbar (search for: Value Bar Sprite).

This adds a value bar as a child object of the Quest Task Requirement object.

Rect Transform #

Adjust the size and position of the object via it’s Rect Transform.

How you place it is up to you – I’ll use the bottom stretch anchor presets and adjust the bar to display below the text as a small, thin line.

Also, move the Value Bar object upwards in the hierarchy to be the first child object of the Quest Task Requirement object. This way the value bar doesn’t obstruct the text.

HUD Value Bar Content #

This component manages the value the value bar displays.

  • Value Type
    Select; Quest Task Requirement

Bar Image #

The value bar uses a sprite and fills it according to the requirement’s count (and max count).

Change the Image components on the Empty Sprite and Value Sprite objects (child objects of Value Bar).

  • Source Image
    Select: White_16x16

Also, change the color of the value sprite (or empty sprite) to your liking.

Tooltips (Optional) #

You can optionally display a Tooltip type HUD with the quest task requirement’s content (if you’ve set up a Tooltip HUD).

To add tooltips to a part of your HUD, simply add a HUD Tooltip component to it. In this case, add the component to the root Quest Task Requirement object.

Create prefab #

My end result looks like this.

Create a prefab out of the Quest Task Requirement object (i.e. not the including Canvas).

You can remove the object from the scene after creating the prefab.

Quest Task Prefab #

Next, we’ll set up the prefab for the quest tasks.

Once again, create a ready to use setup using the scene hierarchy’s context menu (ORK Framework > HUD > Quest > Prefab: Quest Task with Requirement List) or ORK toolbar (search for: Quest Task Requirement List).

HUD List Content #

This component is attached to the Quest Task object and adds the requirements of the task (using the prefab we created). The vertical layout arranges the requirements below the name.

  • Prefab
    Select: Quest Task Requirement

HUD Text Content #

This component is added on the Name child object and manages the text content of the quest task.

  • Show Active
    Enable
  • Text
    Set to: <name>

Text Styling #

Like before, the TextMeshPro – Text (UI) component on the Name > Text child object is responsible for displaying the text.

This is where you can change the font, font size, font color, etc.

I’m using font size 18.

Tooltips (Optional) #

Add a HUD Tooltip component to the Quest Task object in case you want to display a Tooltip type HUD for the quest task’s content.

Create prefab #

Create a prefab out of the Quest Task object (i.e. not the including Canvas).

You can remove the object from the scene after creating the prefab.

Quest Prefab #

Now we’ll set up the prefab for the quests.

Create a ready to use setup using the scene hierarchy’s context menu (ORK Framework > HUD > Quest > Quest with Task List (for prefabs)) or ORK toolbar (search for: Quest with Task List).

HUD List Content #

This component is attached to the Quest object and adds the tasks of the quest (using the prefab). The vertical layout arranges the tasks below the name.

We’ll use the prefab we just created (for the tasks) and enable the active tasks.

  • Prefab
    Select: Quest Task
  • Add Inactive
    Disable this setting.
  • Add Active
    Enable this setting.
  • Add Finished
    Disable this setting.
  • Add Failed
    Disable this setting.

HUD Text Content #

This component on the Name child object manages the text content of the quest. We’ll just display the name of the quest, the default setup should already use the <name> text code.

  • Show Active
    Enable
  • Text
    Set to: <name>

Text Styling #

Like before, the TextMeshPro – Text (UI) component on the Name > Text child object is responsible for displaying the text.

This is where you can change the font, font size, font color, etc.

I’m using font size 20.

Tooltips (Optional) #

Add a HUD Tooltip component to the Quest object in case you want to display a Tooltip type HUD for the quest task’s content.

Create prefab #

Create a prefab out of the Quest object (i.e. not the including Canvas).

You can remove the object from the scene after creating the prefab.

Quest HUD Prefab #

The last prefab is for the actual quest HUD.

Naturally, we’ll create a ready to use setup using the scene hierarchy’s context menu (ORK Framework > HUD > Quest > Quest List HUD (Vertical Layout, fit size)) or ORK toolbar (search for: Quest List HUD).

As the text suggests, this will create a HUD with a Vertical Layout Group and a Content Size Fitter to adjust the object’s size to the displayed content. This is the only way to make sure the HUD will envelope the whole content, since you don’t know how many quests, quest tasks and requirements will be displayed.

HUD List Content #

This component is attached to the Quest List HUD object and adds the quests (using the prefab). The vertical layout arranges the quests.

We’ll use the prefab we just created (for the quests) and enable the active quests.

  • Prefab
    Select: Quest
  • Add Inactive
    Disable
  • Add Active
    Enable
  • Add Finished
    Disable
  • Add Failed
    Disable

Image (Optional) #

Add an Image component to display a background image in the HUD.

  • Source Image
    Select: BoxBlue
    Or any other  spirte you’d like to use.
  • Color
    Select a color you want to use (optional).
    I’ll stick with a white color with full alpha.

Rect Transform #

The default width of the setup is a bit small, so we’ll adjust the width.

  • Width
    Set to 400.

You can also place the HUD on the canvas where you want it to show up. I’d recommend to use anchor presets according to the placement. E.g. if you place the HUD at the top left corner, use a top left anchor preset.

And that’s my final result.

Create prefab #

Create a prefab out of the Quest List HUD object (i.e. not the including Canvas).

You can now remove the canvas (and HUD) from the scene.

HUD Setup #

As a last step, we’ll set up the HUD in the ORK editor.

Open the ORK editor, navigate to UI > HUDs, add a new HUD and change the following settings.

HUD Settings #

  • Name
    Set to: Quests
  • HUD Type
    Select: Quest
  • Auto Display
    Enable
    This will automatically show the HUD. If you use a HUD only as a  template, make sure to disable this setting.

Quest Settings #

  • UI Layout
    Select None.
    This will not use a layout, using the prefab’s position instead.

Display Conditions #

You can use these settings to only show the HUD based on conditions. E.g. only in the field (out of battles) or when there are quests or certain quest types.

  • Has Quests
    Enable
  • Has Active
    Enable

Unity UI #

  • UI Layer
    Select: HUD (or any other UI layer you want the HUD to display on).
  • HUD Prefab
    Select: Quest List HUD.

Save Settings #

Don’t forget to save the changes you did in the editor using the Save Settings button at the bottom.

Testing #

Hit play and test your HUD! Naturally, you need an active quest for this to work.

If you’re not satisfied with the look, open up the prefabs for the HUD, quest, quest task or quest task requirement and adjust them to your liking.

E.g. looking at my HUD, I’ll probably have to adjust a few things.

There – I’ve changed the following things:

  • Quest Prefab
    Changed the quest name’s font color
  • Quest Task Prefab
    Increased Left padding to 15 in the Vertical Layout Group component.
  • Quest Task Requirement Prefab
    Set the Left value to 25 in the Rect Transform component of the Name and Value Bar child objects.

And that’s it!

Table of Contents
  • Quest Task Requirement Prefab
    • HUD Text Content
      • Image Size (Optional)
      • Text Styling
    • Adding a value bar (Optional)
      • Rect Transform
      • HUD Value Bar Content
      • Bar Image
    • Tooltips (Optional)
    • Create prefab
  • Quest Task Prefab
    • HUD List Content
    • HUD Text Content
      • Text Styling
    • Tooltips (Optional)
    • Create prefab
  • Quest Prefab
    • HUD List Content
    • HUD Text Content
      • Text Styling
    • Tooltips (Optional)
    • Create prefab
  • Quest HUD Prefab
    • HUD List Content
    • Image (Optional)
    • Rect Transform
    • Create prefab
  • HUD Setup
    • HUD Settings
    • Quest Settings
    • Display Conditions
    • Unity UI
    • Save Settings
  • Testing
Sitemap
  • ORK 4 BETA
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (73)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (156)
Search

© 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!