HUD Navigation System
  • HUD Navigation System
  • Getting Started
    • Installation
    • Example Content
    • Support / Feedback
    • FAQ's
  • HUD Navigation System
    • Component Info
    • Settings
  • HUD Navigation Canvas
    • Component Info
    • Settings / UI References
  • HUD Navigation Element
    • Component Info
    • Settings
    • Element Settings
    • UI Prefabs
    • Events
  • Scene Manager
    • Component Info
    • Settings
    • Scene Configurations
  • Map Profiles
    • Component Info
    • Create Profiles
Powered by GitBook
On this page
  • Map Profile
  • Custom Layers
  • Settings
  • Code Example

Was this helpful?

  1. Map Profiles

Component Info

Map Profiles - Overview

PreviousScene ConfigurationsNextCreate Profiles

Last updated 5 years ago

Was this helpful?

Map Profile

Map Profiles store the rendered (mini)map texture as well as it's corresponding map bounds. To create a new Map Profile, you have to use the .

Custom Layers

You can add Custom Layers to any Map Profile, which you can access by code at runtime.

Custom Layers can be used to include custom logic to your (mini)map, such as day/night mode, cave systems, heat maps, etc...

Settings

  • Name: Enter a unique name, which will be used to access this layer in code

  • Texture: Assign your custom layer texture. Make sure it has the same dimensions as the map texture!

  • Enabled: If checked, the custom layer is enabled and can be accessed by code.

Code Example

Toggle a custom layer's visibility by pressing the "F" key.

using UnityEngine;
using SickscoreGames.HUDNavigationSystem;

public class CustomLayerExample : MonoBehaviour
{
	private HUDNavigationSystem _HUDNavigationSystem;

	void Start ()
	{
		_HUDNavigationSystem = HUDNavigationSystem.Instance;
	}


	void Update ()
	{
		// check if the 'F' key was pressed
		if (Input.GetKeyDown(KeyCode.F) && _HUDNavigationSystem.currentMinimapProfile != null)
		{
			// get custom layer from the current map profile
			GameObject customLayer = _HUDNavigationSystem.currentMinimapProfile.GetCustomLayer("customLayerName");
			if (customLayer != null)
				customLayer.SetActive(!customLayer.activeSelf);
		}
	}
}
Map Texture Creator