Unity logo
取消
购物车
应用
Sell Assets

11000+款5星资源

8.5万+用户参与评分

10万+社区成员鼎力支持

每款资源都经过 Unity 审核

首页
工具
行为 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.
可编程渲染管线(SRP)兼容性
Unity可编程渲染管线(SRP)是让您能够通过C#脚本控制渲染的一个功能。SRP是支撑通用渲染管线(URP)和高清渲染管线(HDRP)的底层技术。
Unity版本内置渲染管线通用渲染管线(URP)高清渲染管线(HDRP)
2022.3.22f1
兼容
兼容
兼容
描述

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

技术细节

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

(暂无评分)
8 users have favourite this asset
(8)
$25
席位
1
更新的价格和增值税在结算时计算
退款政策
该资源受Unity资源商店退款政策约束。有关详细信息,请参见《最终用户许可协议》(EULA)中的第2.9.3节。
安全结账方式:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
许可证类型
文件大小
819.1 KB
最新版本
1.0
最新发布日期
2024年7月29日
原始 Unity 版本
2022.3.22
高品质资源
11000+款5星资源
深受用户信赖
8.5万+用户参与评分
强大的社区支持
10万+社区成员鼎力支持
Unity logo
语言
反馈
合作伙伴计划
合作伙伴
USD
EUR
Copyright © 2025 Unity Technologies
所有价格不包含税
USD
EUR