Component Info

Map Profiles - Overview

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 Map Texture Creator.

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);
		}
	}
}

Last updated