MRTK-在PokePointer重叠查询中找到的64个对撞机的最大数量 [英] MRTK - Maximum number of 64 colliders found in PokePointer overlap query

查看:58
本文介绍了MRTK-在PokePointer重叠查询中找到的64个对撞机的最大数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用48 * PressableButtonHoloLens2 + GridObjectCollection 在我的个人项目中构建颜色选择列表.当我运行并用模拟的指尖悬停时,编辑器会向我显示这些警告消息.

问题1 :这是因为太多的按钮彼此之间太靠近了吗?还是只有对撞机的按钮数量超过64个?该消息显示为考虑增加指针配置文件中的查询缓冲区大小"

第二季度:在哪里可以增加缓冲区大小?我在指针配置文件中看不到任何缓冲区大小"字段.

第三季度:会降低性能吗?(增加缓冲区大小)

警告消息

在PokePointer重叠查询中找到的最多64个对撞机.考虑增加指针配置文件中的查询缓冲区大小.UnityEngine.Debug:LogWarning(对象)Microsoft.MixedReality.Toolkit.Input.PokePointer:FindClosestTouchableForLayerMask(LayerMask,BaseNearInteractionTouchable&,Single&,Vector3&)(在资产/MixedRealityToolkit.SDK/功能/UX/脚本/指针/PokePointer.cs:169)Microsoft.MixedReality.Toolkit.Input.PokePointer:OnPreSceneQuery()(在资产/MixedRealityToolkit.SDK/功能/UX/脚本/指针/PokePointer.cs:127)Microsoft.MixedReality.Toolkit.Input.FocusProvider:UpdatePointer(PointerData)(在资产/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:878)Microsoft.MixedReality.Toolkit.Input.FocusProvider:UpdatePointers()(在资产/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:841)Microsoft.MixedReality.Toolkit.Input.FocusProvider:Update()(在资产/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:518)Microsoft.MixedReality.Toolkit.<> c:b__60_0(IMixedRealityService)(位于Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:880)Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServices(IEnumerable 1,动作 1)(在资产/MixedRealityToolkit/服务/MixedRealityToolkit.cs:969)Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(动作`1)(位于Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:950)Microsoft.MixedReality.Toolkit.MixedRealityToolkit:UpdateAllServices()(位于Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:880)Microsoft.MixedReality.Toolkit.MixedRealityToolkit:Update()(在资产/MixedRealityToolkit/服务/MixedRealityToolkit.cs:580)

要复制

  1. 创建一个空的游戏对象
  2. 在其下放置48个PressableButtonHoloLens2预制件
  3. 将GridObjectCollection分配给父对象
  4. 更新布局(单元格宽度x高度= 0.032)
  5. 用模拟的手奔跑和悬停.

预期行为

没有警告消息

您的设置(请完成以下信息)

  • 统一版本[例如2018.4.6f1]
  • MRTK版本[例如v2.0.0]

Q3:会降低性能吗?(增加缓冲区大小)

是的,虽然不清楚相对于场景中的其他组件多少,但我预计会这样.请注意,戳指针确实会在每一帧运行查询,每手至少运行一次.

I am trying to build a color selection list in my personal project, with 48 * PressableButtonHoloLens2 + GridObjectCollection. When I run and hover with the simulated fingertip, the editor gives me these warning messages.

Q1: Is this because too many buttons are too close to each other? Or just the number of the buttons with collider is over 64? The message says 'Consider increasing the query buffer size in the pointer profile'

Q2: Where can I increase the buffer size? I don't see any 'Buffer size' field in the pointer profile.

Q3: Would it decrease performance? (increasing the buffer size)

Warning message

Maximum number of 64 colliders found in PokePointer overlap query. Consider increasing the query buffer size in the pointer profile. UnityEngine.Debug:LogWarning(Object) Microsoft.MixedReality.Toolkit.Input.PokePointer:FindClosestTouchableForLayerMask(LayerMask, BaseNearInteractionTouchable&, Single&, Vector3&) (at Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs:169) Microsoft.MixedReality.Toolkit.Input.PokePointer:OnPreSceneQuery() (at Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/PokePointer.cs:127) Microsoft.MixedReality.Toolkit.Input.FocusProvider:UpdatePointer(PointerData) (at Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:878) Microsoft.MixedReality.Toolkit.Input.FocusProvider:UpdatePointers() (at Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:841) Microsoft.MixedReality.Toolkit.Input.FocusProvider:Update() (at Assets/MixedRealityToolkit.Services/InputSystem/FocusProvider.cs:518) Microsoft.MixedReality.Toolkit.<>c:b__60_0(IMixedRealityService) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:880) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServices(IEnumerable1, Action1) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:969) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(Action`1) (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:950) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:UpdateAllServices() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:880) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:Update() (at Assets/MixedRealityToolkit/Services/MixedRealityToolkit.cs:580)

To reproduce

  1. Create an empty game object
  2. Put 48 x PressableButtonHoloLens2 prefabs under it
  3. Assign GridObjectCollection to the parent
  4. Update layout (cell width x height = 0.032)
  5. Run and hover with simulated hand.

Expected behavior

No warning messages

Your Setup (please complete the following information)

  • Unity Version [e.g. 2018.4.6f1]
  • MRTK Version [e.g. v2.0.0]

https://github.com/microsoft/MixedRealityToolkit-Unity/issues/6052

解决方案

Q1: Is this because too many buttons are too close to each other? Or just the number of the buttons with collider is over 64? The message says 'Consider increasing the query buffer size in the pointer profile'

It is because there are too many buttons close to each other.

Q2: Where can I increase the buffer size? I don't see any 'Buffer size' field in the pointer profile.

You can do this in the PokePointer prefab, in the PokePointer script, look for "Scene Query Buffer Size" field.

Q3: Would it decrease performance? (increasing the buffer size)

Yes I anticipate it would, though unclear how much relative to other components in the scene. Note that the poke pointer does run queries every frame, at least one per hand.

这篇关于MRTK-在PokePointer重叠查询中找到的64个对撞机的最大数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆