Debugging & Troubleshooting

Documentation Unreal Engine AI FAQ

Debug logging, visual debugging, FAQs, and common issue solutions.


Enable Debug Logging

In AI Controller Blueprint:

ActionEvaluation → bDebugLog: true
MovementEvaluator → bDebugLog: true
ThreatDetection → bDebugLog: true
Output Log Messages:
LogEvaluation: Evaluating 3 actions...
LogEvaluation: [LightAttack] Dist:180 Angle:15 Score:0.95 SELECTED
LogEvaluation: [HeavyAttack] Dist:180 Angle:15 Score:0.60 (cooldown:1.2s)

Visual Debugging

Console Commands:
// Show debug for entire SEC system
Evaluator.Debug.DrawAvoidance 0-1
Evaluator.Debug.DrawScoring 0-1
Evaluator.Debug.LogAvoidance 0-1
Evaluator.Debug.LogMovement 0-1
Evaluator.Debug.LogScoring 0-1
Evaluator.Debug.LogStrafeState 0-1
Evaluator.Debug.LogStrafeSwap 0-1
 
Melee.Debug.DrawTracing 0-1

Common Issues

Majority of the times, logs will tell you what is wrong, but if you have a specific case;

AI doesn't attack

Possible Causes:
  • Ability not granted to ASC and ExecuteAbility is not marked with GrantAbilityIfMissing.
  • AbilityTag mismatch, update ability tags on the DataAssets if you changed them somewhere else.
  • Action on cooldown, check your cooldowns and cooldown randomization
  • No valid actions in ActionSet
  • Custom character class missing IAbilitySystemInterface - if your pawn doesn't implement this interface, ActionEvaluationComponent cannot find the ASC and all ability-based actions will silently fail.
  • ByEvent mode: Ability missing Trigger entry - when using ActivationMode = ByEvent, the ability class must have a Trigger entry in its class defaults with the matching tag and source set to Gameplay Event. Without it, HandleGameplayEvent fires but no ability reacts.
Solutions:
  • Check ASC grants ability with correct tag
  • Verify ActionSet AbilityTag matches ability's tags
  • Enable bDebugLog to see why action isn't selected
  • Check distance/angle ranges in ActionSet
  • If using a custom character class, ensure it implements IAbilitySystemInterface and returns a valid UAbilitySystemComponent from GetAbilitySystemComponent(). See the Getting Started guide for details.
  • For ByEvent abilities, open the ability class defaults, go to Triggers, add an entry with your event tag and set Trigger Source to Gameplay Event.

ByEvent activation silently falls back to ByTag (BehaviorTree mode)

Cause: The SEC_ActivationMode key is missing from your Blackboard Data Asset. When the Action System writes "ByEvent" to this key and the key does not exist in the asset, the write is silently ignored. The BT task reads an empty value and falls back to ByTag.
Solution: Open your Blackboard Data Asset and add a Name key called SEC_ActivationMode. Also verify that all other SEC_ keys exist: SEC_ActionId (Name), SEC_AbilityTag (String), SEC_AbilityEndTag (String), SEC_TargetActor (Object), SEC_SelfActor (Object), SEC_Distance (Float).

AI gets stuck after attacking

Cause: End event not sent
Solution:
  • Verify that you are using GameplayAbilityBase, it is necessary for end ability to be detected by SEC components.
  • Check ability sends event on completion, cancellation, AND interruption
  • Look for "Waiting for action to complete..." in log (means no end event received)

Weapon doesn't deal damage

Possible Causes:
  • Socket ID mismatch
  • Trace channel not configured
  • Damage config not set
  • No MeleeTraceComponent on character
Solutions:
  • Verify notify state Socket IDs match weapon TraceSockets IDs exactly
  • Check trace channel, debug and see if it actually hits
  • Assign DamageConfig to weapon
  • Ensure character has USECMeleeTraceComponent (inherited from base)

AI doesn't move

Possible Causes:
  • Movement task not ticking
  • NavMesh not present above hybrid movement range
  • DirectControlThreshold too high/low
Solutions:
  • Verify STTask_AIMovement is in root state with [Tick]
  • Press P in viewport to show NavMesh
  • Adjust DirectControlThreshold (try 500-700)
  • Enable MovementEvaluator debug logging

FAQ

Can I use this with my existing character?

Yes. Add SECCombatControllerComponent to your AI controller and the necessary pawn components to your character. Create an ActionSet, configure an AIConfig, and set up a StateTree. The plugin is designed to integrate with existing projects without requiring you to inherit from EnemyControllerBase or EnemyCharacterBase.

Does this work with multiplayer?

Yes. The plugin supports both listen server and dedicated server configurations. AI logic runs on the server, and key state (health, action execution, combat roles, active ActionSet) replicates to clients automatically. See the Multiplayer docs for details.

Can I use this without Gameplay Ability System?

The melee trace system can work standalone, but action execution relies on GAS. Implementing a non-GAS execution mode is possible with only using behavior tree execution, but i would highly recommend to explore GAS if you didn't yet.

What Unreal Engine versions are supported?

UE 5.6+. StateTree APIs have breaking changes between versions, so older versions are not compatible.

Can I make bosses with this?

Yes. The system scales well. Use ActionSets with phase-specific actions, swap sets at health thresholds, and combine with custom Behavior Tree sequences for scripted attacks.

How do I make ranged enemies?

There is already an example for Supporter role. Pay attention to how they execute their ranged ability. It is quite simple to implement your own by looking at it.

Is source code included?

Yes. Full C++ source is included under MIT license.

Support & Resources

Purchase: Fab Marketplace
Support: Contact through Discord, Fab Marketplace or via email
Updates: Plugin updates delivered through Fab Marketplace
Feature Requests: Contact via Discord, Fab Marketplace, or via email