Targets

Actions and events which need to reference a unit or a player use a shared Target concept, implemented as polymorphic [SerializeReference] fields.

public abstract class UnitTarget
  • TriggeredUnitTarget - the unit that actually triggered the event (for example, the unit which entered a Trigger Zone). Not usable with events that have no specific unit, like MatchStartedEvent.

  • SpecificUnitTarget - a fixed list of Unit references you assign directly in the Inspector.

public abstract class PlayerTarget
  • SpecificPlayerTarget - a fixed player id you set in the Inspector. Currently the only PlayerTarget implementation.

public abstract class UnitTargetedAction : BaseScenarioAction

Base class for actions which act on a UnitTarget (see Base Scenario Action). Adds a Target field, and automatically resolves TriggeredUnitTarget to the unit which triggered the scenario when the action starts.