UI Prefabs
Create your own UI prefabs and customize the look and feel!
Last updated
Create your own UI prefabs and customize the look and feel!
Last updated
HNS needs to know, where to find the different UI elements on your marker. Each feature needs specific UI elements to work properly, so make sure to correctly assign them.
The most simply way to get started is to duplicate any UI prefab and customize it to your needs. You'll find the prefab in the prefabs folder: Sickscore Games > HUD Navigation System > _Examples > HUDPrefabs.
Icon: The main icon for this element
Arrow Above: The icon used as the upwards arrow for the height system
Arrow Below: The icon used as the downwards arrow for the height system
Icon: The main icon for this element
Distance Text: The text component used for the distance text.
Onscreen Rect: The parent transform of the onscreen indicator
Onscreen Icon: The main onscreen icon for this element.
Onscreen Distance Text: The text component used for the offscreen distance text.
Offscreen Rect: The parent transform of the offscreen indicator
Offscreen Pointer: The pointer image used for the offscreen indicator.
Offscreen Icon: The main offscreen icon for this element.
Offscreen Distance Text: The text component used for the offscreen distance text.
Icon: The main icon for this element
Arrow Above: The icon used as the upwards arrow for the height system
Arrow Below: The icon used as the downwards arrow for the height system
Custom Transforms are an easy way to add custom logic to HUD Navigation Elements. We use this mechanic in our example scenes to create the item pick-up.
Custom Transforms can be used to include custom logic to HUD Navigation Elements, such as item pick-ups, interactions, ...
Name: Enter a unique name, which will be used to access this transform in code
Transform: Assign the transform with your custom logic
Show/hide a custom icon on the indicator, if an element is within the defined radius. How to get this example to work:
Add a custom transform to your indicator UI Prefab
Your Custom Transform must be named "customIcon" (see code)
Create a new C# script and copy&paste the code below
Select the HUD Navigation Element or Element Setting you want to use
Assign these methods to their corresponding Events: OnEnterRadius: OnIndicatorEnterRadius() OnLeaveRadius: OnIndicatorLeaveRadius()