Unity logo
取消
购物车
应用
Sell Assets

11000+款5星资源

8.5万+用户参与评分

10万+社区成员鼎力支持

每款资源都经过 Unity 审核

首页
工具
行为 AI
此内容由第三方提供商托管,该第三方提供商在未接受Targeting Cookies的情况下不允许观看视频。如果您想观看来自这些提供商的视频,请将“Targeting Cookie”的Cookie偏好设置为“是”。
1/5

This asset package contains scripts/prefabs to help you build you Canvas based 2D games that need line of sight detection with visible/invisible FOV cones. The asset includes 2 demo scenes one for top-down, one for sidescrolling behavior. The system is designed to be variable in it's performance impact and runs well on mobile as well on PCs.

The project has been developed with Unity 2019.3 but also works with 2019.2. Previous Unity Versions are not supported by the custom editor and the prefabs.



Features:

- Custom Editor for easy setup

- Multiple options to tailor the performance for your target (Mobile/Desktop)

- Highly customizable

- Variable FOV from 1° - 180° degrees

- Variable detection distance

- Automatic rotation from 1° - 180° degrees to the left/right (can stop on detection) with variable speed

- The FOV cone can be set to visible/invisible

- Color for detected/undetected can be set and animated

- Custom sprites for detected/undetected state can be set for the FOV cone

- Multiple tags which trigger detection can be set

- Multiple layers on which the raycast for the line of sight detection is being made can be set

- Raycast only happens when a target object enters the detection radius of the search object

- Detection interval (when the raycast is made) can be set between 0.1 and 5.0 seconds to save on performance

- The density of the rays used for the raycast is variable to save on performance

- The search direction can be toggle from middle to the outside or outside to the middle

- In the editor debug rays can be drawn during gameplay to help debugging gameplay

- Custom Unity Events can be added via the editor when an object is detected or has been lost by detection. The events pass the GameObject of the detector as well as the detected object to easily implement further functions

- Helper function to rotate elements with the FOV cone is included



The code is extensively commented and a pictured pdf documentation is included.

If you encounter bugs, have questions or wishes for the functionality, contact me via the supplied email.

2D Line Of Sight Detection System

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