Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Behavior AI
1/5
Enhance your 2D game's AI with advanced vision and hearing detection capabilities.
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
2022.3.22f1
Compatible
Compatible
Compatible
Description

The SensingComponent2D provides a comprehensive solution for integrating vision and hearing detection into your 2D game. With customizable parameters for perception radius, angle, and detection layers, this component allows your game characters to detect and respond to visual and auditory stimuli. Use the built-in events to trigger specific actions when objects are detected or forgotten, and when noises are heard. Ideal for developers looking to add realistic AI perception to their projects.


Sensing Component 2D Documentation

Discord


Technical details

The SensingComponent2D script offers robust 2D sensing capabilities for Unity, including vision and hearing detection. Key features include:

  • Vision Detection: Configurable perception radius and angle, with detection and obstacle layers. Objects within the vision range trigger the OnVisionObjectDetected and OnVisionObjectForgotten events.
  • Hearing Detection: Detects noises based on a specified threshold, triggering the OnNoiseHeard event.
  • Customizable Parameters: Adjustable sensing interval, detection layers, and hearing threshold.
  • Easy Integration: Simply attach the component to your game object and configure the parameters in the Unity Editor.

The script utilizes Unity's physics system to detect objects within a specified radius and angle, and raycasting to determine line-of-sight for vision detection. It includes coroutine-based vision detection to manage performance efficiently. The component's hearing detection allows for dynamic sound event handling, making it perfect for creating immersive AI behaviors in 2D environments.

Sensing Component 2D

(not enough ratings)
3 users have favourite this asset
(3)
$14.99
Seat
1
Updated price and taxes/VAT calculated at checkout
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
License type
File size
490.0 KB
Latest version
1.0
Latest release date
Sep 29, 2024
Original Unity version
2022.3.22
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR