编辑器拓展 【更新】SensorToolkit 2 2.5.10传感器

Unity插件信息
插件名称: SensorToolkit 2
插件官网: https://assetstore.unity.com/packages/tools/behavior-ai/sensortoolkit-2-205336
版本: 2.5.10
解压密码:
素材类型: 编辑器拓展
本帖最后由 微笑的猫 于 2024-4-12 15:50 编辑


SensorToolkit系列索引

SensorToolkit 2 2.0.3  下载链接
SensorToolkit 2 2.4.1  下载链接
SensorToolkit 2 2.4.6  下载链接
SensorToolkit 2 2.5.4  下载链接
SensorToolkit 2 2.5.6  下载链接
SensorToolkit 2 2.5.13  下载链接




SensorToolkit is a powerful abstraction over the built-in Unity functions like Raycasts, Overlaps and Trigger Colliders. You can add standalone sensor components to your game objects and configure them as needed. The sensors can be queried to determine what they detect and provide additional information, such as the visibility or shape of the target.

Features:
• Works in both 2D and 3D.
• Many sensor types available: Raycasting, Overlaps, Steering, Line of Sight and more.
• Lightweight and modular. Sensors are independent components that feel native to Unity.
• Easy to integrate with your project: simply add a sensor component and configure it.
• Flexible and unopinionated, allowing you to design your game as desired.
• Many filtering options and querying functions for precise detection.
• Capable of detecting individual colliders or rigid bodies made up of multiple colliders.
• Advanced line-of-sight implementation can calculate partial visibility.
• Performance is a key focus, with many options available to control performance.
• Test sensors in the editor and confirm their configurations before running the game.
• Upgraded steering behaviour based on 'Context-Based Steering' method.
• All source code is included.
• Zero garbage generated.

Who is this for:
SensorToolkit is designed to be user-friendly and easy to use, regardless of your level of programming experience. Non-programmers will appreciate the ability to create complex detection behaviors without writing code, as the kit is integrated with Playmaker and additional integrations are planned. Programmers will find SensorToolkit to be a powerful foundation for building AI behaviors, as it manages the complexities of object detection and provides a clean and simple interface. The widgets and debugging inspectors also help you quickly identify any configuration issues, allowing you to reduce boilerplate and keep your code organized and efficient.

Integrations:
- Playmaker
- Behavior Designer
- Game Creator 2
- Adventure Creator
More coming...

But detecting things is easy?
Sometimes, I'm asked why to use this asset when it's easy to call the functions for raycasts and overlaps directly. While it is true that these are simple tasks, that is not the only value that SensorToolkit aims to bring. The main challenges that this asset aims to solve are as follows:
• Comprehensive coverage of the raycast, overlap, and trigger collider functionality.
• Debug widgets that show the exact shape of a sensor's detection range.
• Ability to examine what a sensor detects during runtime or in the editor, saving time and effort in debugging by clearly showing whether a sensor can detect an object or not.
• Powerful implementation for line-of-sight testing, with a lot of effort put into this sensor.
• Robust event-driven architecture that allows you to change all sensor settings at runtime without encountering bugs.
• Sensors can detect objects made up of many sub-objects, such as a rigid body with multiple colliders on child objects. The sensors can intelligently map many input objects to a single output detection, with high configurability.
• Convenience functions that return lists or can be enumerated, without generating garbage.
• Sensors can be plugged into each other to build up complex detection behaviour.
• Much flexibility is provided to control the performance impact of the sensors at runtime.

Difference from v1:
This is a significant update from the first version of SensorToolkit. While it may seem familiar, there are a significant number of changes. The first version's code was difficult to extend, making it hard to add new sensors or extend existing ones without blowing out complexity. SensorToolkit 2, on the other hand, has a new architecture and philosophy that makes it easier to add new features. Some of the major new features include:
• Sensors capture the bounding box of detected objects, allowing for easy targeting of an object's center of mass.
• Ray sensor supports all Physics.Raycast shapes including 'ray', 'sphere', 'box' and 'capsule'.
• Range sensor supports all Physics.Overlap shapes including 'sphere', 'box' and 'capsule'.
• Sensors do not implement the 'Update' method, meaning that if a sensor is not pulsing, it has no performance impact when this function is called each frame. This is especially useful for the TriggerSensor, allowing you to create many static trigger zones with good scalability while still being able to use the toolkit's comprehensive API.
• Line of Sight is now a separate sensor. It's been significantly extended, including the ability to smooth visibility scores over multiple frames, so it's possible to calculate fractional visibility using a single ray per pulse. It can scale visibility by distance and view angle so it's no longer necesassary to use a FOVCollider.
• Sensor pulses are randomly staggered so they don't fall on the same frame when they have the same pulse interval.
• Steering sensor that replaces the old Steering Rig and is based on the more advanced "Context Based Steering" method, which should work better and be easier to use.
• New arc sensor that allows for raycasts over a parabola.
• New boolean sensor lets you combine the results of multiple other sensors. For example: 'What are the things that I can hear and also see'.
• Ability to inject custom code into sensor detection logic for custom filtering needs.
• New Navmesh sensor for analyzing a navmesh.
• More robust codebase that has eliminated all outstanding bugs.



SensorToolkit 是对内置 Unity 功能(如光线投射、重叠和触发碰撞器)的强大抽象。您可以在游戏对象中添加独立的传感器组件,并根据需要对其进行配置。可以对传感器进行查询,以确定它们检测到了什么,并提供额外的信息,如目标的可见度或形状。

特点
- 可在 2D 和 3D 中运行。
- 提供多种传感器类型: 光线投射、重叠、转向、视线等。
- 轻量级和模块化。传感器是独立的组件,与 Unity 浑然一体。
- 易于与项目集成:只需添加一个传感器组件并进行配置即可。
- 灵活而不受约束,让您可以根据需要设计游戏。
- 多种过滤选项和查询功能可实现精确检测。
- 可检测单个碰撞器或由多个碰撞器组成的刚体。
- 先进的视线功能可计算部分可见度。
- 性能是重点,有许多选项可用于控制性能。
- 在编辑器中测试传感器,并在运行游戏前确认其配置。
- 基于 "基于上下文的转向 "方法升级了转向行为。
- 包含所有源代码。
- 零垃圾生成。

适用对象
SensorToolkit 设计为用户友好型,易于使用,无论您的编程经验水平如何。该工具包已与 Playmaker 集成,并计划进行更多集成,因此非编程人员无需编写代码即可创建复杂的检测行为,这一点会让他们非常满意。程序员会发现 SensorToolkit 是构建人工智能行为的强大基础,因为它能管理复杂的对象检测,并提供简洁的界面。小工具和调试检查器还能帮助您快速发现任何配置问题,从而减少模板,保持代码的有序和高效。

集成:
- Playmaker
- 行为设计器
- 游戏创建器 2
- 冒险创建器
更多内容即将推出...

但检测东西很容易吗?
有时,有人问我,直接调用射线发射和重叠函数就可以了,为什么还要使用这种资产?虽然这些任务的确很简单,但这并不是 SensorToolkit 的唯一价值所在。该资产旨在解决的主要挑战如下:
- 全面覆盖光线投射、重叠和触发碰撞器功能。
- 可显示传感器检测范围确切形状的调试小工具。
- 能在运行时或编辑器中检查传感器检测到的物体,通过清晰显示传感器是否能检测到物体来节省调试时间和精力。
- 强大的视线测试功能,在该传感器上投入了大量精力。
- 强大的事件驱动架构,可在运行时更改所有传感器设置,而不会出现错误。
- 传感器可检测由多个子物体组成的物体,例如在子物体上有多个碰撞器的刚体。传感器可以智能地将许多输入对象映射到单个输出检测中,具有很高的可配置性。
- 返回列表或可枚举的便捷函数,不会产生垃圾。
- 传感器之间可以相互插入,以建立复杂的检测行为。
- 提供了很大的灵活性,可在运行时控制传感器对性能的影响。

与 v1 的区别
这是对第一版 SensorToolkit 的重大升级。虽然看起来似曾相识,但还是有很多变化。第一版的代码很难扩展,因此很难在不增加复杂性的情况下添加新传感器或扩展现有传感器。另一方面,SensorToolkit 2 采用了新的架构和理念,使得添加新功能变得更加容易。一些主要的新功能包括
- 传感器捕捉检测到的物体的边界框,便于定位物体的质量中心。
- 射线传感器支持所有物理射线形状,包括 "射线"、"球体"、"方框 "和 "胶囊"。
- 范围传感器支持所有物理重叠形状,包括 "球体"、"方框 "和 "胶囊"。
- 传感器没有实现 "更新 "方法,这意味着如果传感器没有脉动,则在每帧调用此函数时不会对性能产生影响。这对触发传感器(TriggerSensor)尤其有用,可以创建许多具有良好扩展性的静态触发区,同时还能使用工具包的综合 API。
- 视线传感器现在是一个独立的传感器。它的功能得到了大幅扩展,包括在多个帧中平滑可见度分数,因此可以使用每个脉冲的单条光线来计算分数可见度。它可以根据距离和视角缩放可见度,因此不再需要使用 FOVCollider。
- 传感器脉冲会随机错开,因此当脉冲间隔相同时,它们不会落在同一帧上。
- 转向传感器取代了旧的 S




作者 cg小白兔 发表于 2023-12-6 10:49:01
您需要登录后才可以回帖 登录 | 立即注册
cg小白兔

关注0

粉丝0

发布7579

热门作品推荐
glow
Fluid Flux 3.0 适配UE5.3+
glow
BLE Utilities V2 2.0.9 UE5.5
glow
【更新】Character Auras 1.3光环效果
glow
【更新】Character Auras 3 1.1角色魔法光
glow
【更新】Epic Toon VFX 2 1.3卡通特效
glow
【更新】Support package for Hovl Studio
glow
【更新】DeepVoice AI - Text To Voice 2.1
glow
100 Sci-Fi Icons Pack 100个独特的图标
glow
【更新】Dedicated Server Kit 1.0.6服务器
glow
MC Greet & Talk - Believable 3D Animatio