View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0
- Last updated
- First released
- Unity version
- 2022.3.22 or later
- Package size
- 819 KB
- Files
- 6
- Favorites
- 9
- Views in the past week
- 3
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $12.50 on
Keywords
Sensing Component
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.
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 4
Sensing Component screenshot 1
About this asset
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.
From the publisher's Asset Store listing.
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.
Compatibility
| Unity version | Built-in | URP | HDRP |
|---|---|---|---|
| 2022.3.22f1 | Compatible | Compatible | Compatible |
As listed on the Asset Store.