ExtendRealityLtd / ExtendRealityLtd/Tilia.Input.UnityInputSystem
Duplicated PlayerInput.cs in prefabs disable input in builds for Windows Mixed Reality
- Ngôn ngữ chính
- C#
- Star
- 3
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Environment
* Code source: Tilia.Input.UnityInputSystem
* Code version: 2.4.3
* Platform version: Unity 2021.3.24
* 3rd party dependencies: Windows Mixed Reality Portal
### Steps to reproduce
In a simple scene, or in the tilia farm, add the `UnityInputSystem.Poses.GenericXR.prefab` into the scene. Optionally, have the pointers follow the prefab's `LeftPointer` and `RightPointer` instead of the `LeftControllerAlias` and `RightControllerAlias`. If not there already, add the `UnityInputSystem.InputActionMappings.GenericXR.prefab` and map actions to it.
### Expected behavior
After a build, and using WMR OpenXR, pointers follow the controller pointer pose, like in the editor.
### Current behavior
Controllers are tracked, but no controller input is received.
### Testing done
I tested multiple configurations and builds. It seems that if multiple instances of `PlayerInput.cs` are enabled, the Windows Mixed Reality OpenXR runtime stops processing input. This happens only on builds, and only for WMR. Disabling all but one of the scripts fixes the issue.
I recommend adding a script to both Tilia input prefabs that `OnReset()` checks for enabled instances of `PlayerInput.cs` in the scene hierarchy, and disables it from its own prefab if another instance is active. A debug warning would be useful as well.
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện vấn đề trong Unity 2021.3.24 với Windows Mixed Reality bằng cách sử dụng UnityInputSystem.Poses.GenericXR.prefab và UnityInputSystem.InputActionMappings.GenericXR.prefab. Kiểm tra các instance của PlayerInput.cs và hành vi OnReset() được yêu cầu trong cả hai input prefab. Được xem là hoàn tất khi các bản build vẫn giữ được đầu vào của bộ điều khiển với chỉ một instance PlayerInput.cs được bật và cung cấp cảnh báo debug hữu ích khi phát hiện các bản sao trùng lặp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, unity
- Lĩnh vực
- game-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100