以下是__空间映射渲染器 (Spatial Mapping Renderer)__ 和__空间映射碰撞体 (Spatial Mapping Collider)__ 组件的共同设置。
设置 | 描述 |
---|---|
Surface Parent | 选择希望由空间映射组件生成的表面游戏对象继承自的__表面父级 (Surface Parent)__ 游戏对象。将此设置保留为 None(Game Object) 可自动生成表面父游戏对象。 |
Freeze Updates | 选中此复选框可停止组件向系统查询表面更改。 注意:__每个空间映射组件会定期在空间映射数据中查询物理空间中的表面更改。查询和烘焙表面的过程存在内存、性能和功耗方面的成本。对于希望基本为静态的环境,建议让用户在一段时间内观察环境而不更新表面游戏对象。 如果希望模拟中的环境在很大程度上为静态且不变(如棋盘游戏),可以在应用程序启动时预先扫描所需的表面数据,然后将 Freeze Updates__ 属性设置为 true 以防止进一步更新。这样可以略微提高性能并降低功耗。 |
Time Between Updates | 指定对物理空间中的表面更改进行查询的间隔时间(以小数格式的秒为单位,如 3.7 或 4.6)。默认值为 2.5 秒。请注意,查询越频繁,内存、性能和功耗的成本就越高。 |
Removal Update Count | 在系统删除表面游戏对象之前的更新次数。在此上下文中,可将一次更新视为一帧。默认为 10 次更新。 注意:__当空间映射通知组件表面游戏对象不再位于 SurfaceObserver 的包围体中时(即不再位于系统报告的规定区域中时),将开始进行删除更新倒计时。此设置允许您指定此事件之后在空间映射删除表面游戏对象之前应执行的更新次数。 | | Level of Detail| 组件生成的网格质量(__Low、Medium 或 High__)。默认质量为 Medium。质量越高,生成的碰撞体或渲染网格越精细和准确。使用较低质量的设置可以在性能和功耗方面降低成本。请参阅此表下的图了解三个 Level Of Detail__ 模式的示例。 |
Bounding Volume Type | 组件的包围体区域形状,应用程序在其中接收空间映射数据。此设置可以是 Sphere 或 Axis Aligned Box。默认为 Axis Aligned Box。 注意:__包围体是系统报告物理表面更改并限制空间映射网格范围的规定区域。| | Size In Meters| 组件使用的包围体的大小(以米为单位)。按半径配置 Sphere__;默认半径为 2 米。按面积配置 Axis Aligned Box__;默认值为 Vector3 (4,4,4)。 注意:__观察者的包围体是供空间映射报告物理表面更改的规定区域。 |
两个空间映射组件都允许为每个组件生成的空间网格指定三个细节级别之一(Low、Medium 或 High),如下图所示。
如果可能,请将 Spatial Mapping Colliders 的 Level of Detail 设置为 Low。这样将在计算碰撞交点时提高性能并降低功耗。但是,将 Level of Detail 设置为 Low 可能会对应用程序的视觉效果产生负面影响。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.