Skip to content

MapFogOverlayUI

The MapFogOverlayUI component applies fog of war overlay to a UI image, allowing you to add the fog effect to your custom map.

Required Component

The MapFogOverlayUI component requires either an Image or RawImage component on the same GameObject.

Usage

  1. Create a GameObject under your Canvas.

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

  3. Add the MapFogOverlayUI component to the same GameObject.

  4. Configure the fog properties in the Inspector.

Inspector Properties

MapFogOverlayUI Inspector

  • Unexplored Fog Texture: Texture for unexplored (hidden) areas on the minimap.

  • Unexplored Fog Color: RGB color tint for the fog texture in unexplored areas.

  • Explored Fog Texture: Texture for explored but not currently visible areas on the minimap.

  • Explored Fog Color: RGBA color tint for the explored fog texture. Alpha controls the opacity level.