Skip to content

Simple Example

The package includes a demo scene that demonstrates all core features of the fog of war system in action.

Controls

  • Use the arrow keys to move the camera.
  • Press 'M' to toggle the minimap between minimap and fullscreen map modes.
  • Click on player units, then click on the map to move them.

What the demo shows

  • VisionSource components on player units that dynamically reveal fog.
  • VisibilitySwitch components demonstrating visibility events:
    • Enemies and large objects (like buildings) appear and disappear based on fog coverage.
    • Custom Shader Graph transparent shader used for fading enemies.
  • Map and MapMarker components:
    • Player and enemy units marked on the map.
    • Enemy markers disappear when not visible.
  • Sample quest scenario:
    • UI directs the player to a marked location.
    • Discovering the area updates the quest and reveals part of the map.