Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Cameras
  4. Attack Warning Manager

Attack Warning Manager

The Attack Warning Manager component allows to highlight areas in the minimap where the local player’s units/buildings are receiving damage from enemy factions

When you’re creating a new map using the RTS Engine menu editor, this component is attached to an object called “MinimapManager”.

  1. Minimap Canvas: Drag and drop the minimap canvas in this field, where the UI attack warnings are rendered.
  2. Minimap Camera: Drag and drop the camera that renders the minimap in this field.
  3. Prefab: The prefab that is cloned when a new attack warning is spawned. This prefab has the Attack Warning component (which doesn’t have any exposed fields) and the Effect Obj component attached to it. Making it an effect object allows it to be pooled efficiently using the Effect Obj Pool component:
    1. Code: Make sure that a unique code is assigned to the attack warning prefab.
    2. Default Life Time: This is the duration for which each attack warning will be displayed for.
    3. On Disable Event: Drag and drop the attack warning prefab and set the event to “Attack Warning -> Disable()”.
  4. Audio Clip: Played when a new attack warning is spawned.
  5. Show UI Message: When enabled, a UI message will be displayed for the player when a new attack warning is spawned?
  6. Min Distance: The minimum distance required between all active attack warnings. This allows to avoid spawning attack warning at the same or very close positions in a short duration.

How can we help?