Skip to content

Map

The Map component applies the fog of war effect to a UI minimap and renders MapMarkers.

Usage

  1. Create a GameObject under your Canvas.

  2. Add an Image or RawImage component to the GameObject and assign a texture.

  3. Add the Map component to the GameObject.

  4. Configure the component properties in the Inspector.

Inspector Properties

Map Inspector

  • Fog Color: The color overlay for undiscovered areas on the map.

  • Discovered Alpha (0-1): The opacity level for the fog overlay in discovered but currently non-visible areas.

  • Max Markers (min 0): The maximum number of markers that can be displayed simultaneously. If the number of markers in the scene exceeds this limit, markers with the lowest priority values will not be rendered. Higher values increase computational cost.

  • Markers Scale (min 0): A global size multiplier applied to all marker icons. This allows you to quickly adjust the size of all markers on the map without modifying individual marker settings. Useful for adapting marker sizes when changing map dimensions, creating different zoom levels, or adjusting UI scale for different screen resolutions.