Examples
The package includes demo scenes that demonstrate the features of the fog of war system.
Simple Example
This demo scene 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
VisionSourcecomponents on player units that dynamically reveal fog.VisibilitySwitchandFadercomponents 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 smoothly.
- Enemy map markers are enabled/disabled based on visibility.
MapFogOverlayUIcomponent:- Demonstrates how to create a custom minimap with map markers.
- Minimap displays fog coverage in real-time.
- Toggle between minimap and fullscreen map views.
- Sample quest scenario:
- UI directs the player to a marked location.
- Discovering the area updates the quest and reveals part of the map.
Layers Example
This demo scene demonstrates the Vision Layers system for elevation-based visibility.
What the demo shows
- Multi-floor building environment with different elevation levels.
- Units on different floors with layer-based vision:
- Ground units can only see ground level.
- Units on higher floors can see their floor and below.
- Flying units can see all elevations.
- Practical application of the vision layer system for multi-level gameplay.