# Component Info

## 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](https://sickscoregames.gitbook.io/hud-navigation-system/map-profiles/create-profiles).

![](https://1678974394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M60ifXggrwX3SPH6XX3%2Fuploads%2FBz2U9IULTEaoz7wiNORK%2FHNS%20Map%20Profile.png?alt=media\&token=7b2a96a1-f9ee-4ee4-b660-b1274625a098)

## Custom Layers

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

{% hint style="info" %}
*Custom Layers* can be used to include custom logic to your (mini)map, such as day/night mode, cave systems, heat maps, etc...
{% endhint %}

### 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.

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