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
The SensingComponent script enables game objects to detect other objects within a vision cone and respond to noise events within a specified range, making it ideal for AI behaviors in Unity.
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 SensingComponent script is a versatile Unity component designed to enhance AI perception by providing vision and hearing capabilities. With customizable vision radius, length, and segments, the script detects objects within a defined vision cone and triggers the OnGameObjectSeen event. Additionally, it supports auditory detection, allowing game objects to react to noise events reported by other objects through the OnNoiseHeard event. The component includes debugging features to visualize the vision cone in the Unity Editor, ensuring accurate setup and functionality. Ideal for creating immersive AI behaviors, this script is essential for developers looking to implement advanced perception systems in their games.



Sensing Component Documentation


Discord

Technical details

The SensingComponent script provides vision and hearing detection capabilities for Unity game objects. Key features include:

  • Vision Detection: Configurable vision cone with visionRadius, visionLength, and visionSegments. Objects within the cone trigger the OnGameObjectSeen event.
  • Hearing Detection: Static ReportNoise method allows other objects to report noise events. The OnNoiseHeard event is triggered if the noise volume exceeds the maxHearingVolume and hearing is enabled.
  • Debugging: Visualize the vision cone in the Unity Editor using Gizmos for accurate setup.
  • Coroutines: Vision detection runs on a coroutine with a customizable interval (sensingInterval), ensuring efficient and periodic checks.
  • Event Handling: Methods HandleGameObjectSeen and HandleNoiseHeard provide customizable responses to vision and hearing events.

Sensing Component

(not enough ratings)
8 users have favourite this asset
(8)
$25
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
819.1 KB
Latest version
1.0
Latest release date
Jul 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