Unity logo
取消
购物车
应用
Sell Assets

11000+款5星资源

8.5万+用户参与评分

10万+社区成员鼎力支持

每款资源都经过 Unity 审核

首页
工具
行为 AI
1/5
Enhance your 2D game's AI with advanced vision and hearing detection capabilities.
可编程渲染管线(SRP)兼容性
Unity可编程渲染管线(SRP)是让您能够通过C#脚本控制渲染的一个功能。SRP是支撑通用渲染管线(URP)和高清渲染管线(HDRP)的底层技术。
Unity版本内置渲染管线通用渲染管线(URP)高清渲染管线(HDRP)
2022.3.22f1
兼容
兼容
兼容
描述

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


技术细节

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

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