In my experience building combat AI and stealth mechanics in Unity, writing perception systems from scratch is one of those tasks that seems straightforward until you hit scaling issues. Performing continuous Physics.OverlapSphere calls and multiple raycasts per character frame quickly tanks CPU frame budgets when you have dozens of agents searching for target targets simultaneously.
The Senses Pack for Behavior Designer Pro tackles this specific bottleneck. It acts as an extension module for Opsive’s Behavior Designer framework, adding modular sensory capabilities—such as Vision, Hearing, and Touch—directly into your existing behavior trees as conditional nodes and tasks. Architecturally, it decouples target detection logic from unit behavior logic. Instead of hardcoding sight checks inside state machines, the Senses Pack provides node-based spatial partitioning, angle testing, line-of-sight (LOS) occlusion checks, and noise event listeners that pipe clean target data directly into your tree variables.
What makes this extension practical for production environments is how it balances sensory accuracy with runtime optimization. Here is a breakdown of the core systems included under the hood:
The vision system evaluates targets based on horizontal and vertical Field of View (FOV) angles, maximum sight distances, and line-of-sight raycasting. Rather than evaluating a single pivot point—which often results in false negatives when an enemy's feet are hidden behind low cover—the sensor allows multi-point LOS testing (e.g., checking target head, center, and feet origins).
The hearing sensor operates via sound event listeners rather than expensive continuous distance polling. Objects capable of making noise emit spatial events with a sound radius and volume multiplier. AI agents equipped with the CanHearObject conditional task process these events based on obstacle attenuation and distance metrics.
Physics and Physics2D, ensuring compatibility regardless of space dimension.Honestly, any title requiring reactive enemy AI benefits from this pack, but certain genres gain an immediate advantage during rapid prototyping:
Integrating the Senses Pack into an active Behavior Designer setup is straightforward. Here is the step-by-step workflow I follow to get an agent detecting targets within minutes.
Attach the primary BehaviorTree component to your character prefab. Next, ensure your target object (e.g., the Player) is assigned to a distinct layer, such as Player or Target.
Inside the Behavior Designer Editor, add the Can See Object conditional task to your tree structure. Configure the task properties in the inspector:
Player.90.20.Returned Object -> targetGameObject.To use auditory perception, game events (like gunshots or footstep impacts) need to emit noise. Here is a clean C# script you can attach to noise-making objects to broadcast events to nearby listeners:
using UnityEngine;
namespace Game.AI.Perception
{
public class NoiseEmitter : MonoBehaviour
{
[Header("Audio Perception Settings")]
[SerializeField] private float baseNoiseRadius = 15f;
[SerializeField] private LayerMask perceptionLayerMask;
/// <summary>
/// Call this method when an action (footstep, gun shot, collision) creates a sound.
/// </summary>
public void TriggerNoiseEvent(Vector3 location, float volumeMultiplier = 1.0f)
{
float calculatedRadius = baseNoiseRadius * volumeMultiplier;
Collider[] detectedListeners = Physics.OverlapSphere(location, calculatedRadius, perceptionLayerMask);
for (int i = 0; i < detectedListeners.Length; i++)
{
// Verify if the listener object contains a receiver component
if (detectedListeners[i].TryGetComponent<IAudioListenerTarget>(out var listener))
{
listener.OnAudioHeard(location, calculatedRadius);
}
}
}
private void OnDrawGizmosSelected()
{
Gizmos.color = new Color(1f, 0.92f, 0.01f, 0.4f);
Gizmos.DrawWireSphere(transform.position, baseNoiseRadius);
}
}
public interface IAudioListenerTarget
{
void OnAudioHeard(Vector3 noiseOrigin, float loudness);
}
}
| Category | Tools / Behavior AI |
|---|---|
| Latest Version | v1.0.6p1 (2 tracked releases) |
| File Size | 4.78 MB |
| Added to Platform | May 31, 2026 |
| Views | 10 views |
| Downloads | 4 downloads |
| Favourites | 3 favourites |
| Official Store | Buy Original License on Unity Asset Store → |
| Issue with Package? | Report Broken Link → |