MixedRealityToolkit-Unity
MixedRealityToolkit-Unity copied to clipboard
MRTK 2.6.1 Feature Tool Fails to add Mixed Reality Toolkit to Unity main menu
Describe the bug
When starting a brand new Unity project following the documentation here using Unity versions 2020.2.7 - 2020.3.2 with MR Feature Tool v1.0.2103.3 Beta does not add the Mixed Reality Toolkit option to Unity main menu. This prevents configuring projects for MRTK.
To reproduce
1 Download and install latest version of MR Feature Tool v1.0.2103.2 Beta or higher. 2 New Unity project using any version Unity 2020.2.7 or higher. 3 Follow documentation shown above down to "Switching the Build Platform". 4 Choose the 2020 + OpenXR tab for instruction for Unity 2020.x.x 5 Continue following instructions. 6 At the conclusion of the Feature Tool import select back to Unity. 7 Unity will install packages as expected and are listed in the packages folder of project. 8 No window opens for configuration and most importantly, the main menu is not updated to include the Mixed Reality Toolkit.
Expected behavior
1 Download and install latest version of MR Feature Tool v1.0.2103.2 Beta or higher. 2 New Unity project using any version Unity 2020.2.7 or higher. 3 Follow documentation shown above down to "Switching the Build Platform". 4 Choose the 2020 + OpenXR tab for instruction for Unity 2020.x.x 5 Continue following instructions. 6 At the conclusion of the Feature Tool import select back to Unity. 7 Unity will install packages as expected and are listed in the packages folder of project.
Expect to see: 8 Window opens for configuration and the main menu is updated to include the Mixed Reality Toolkit.
Screenshots
none
Your setup (please complete the following information)
- Unity 2020.2.7f1 or higher
- MRTK Version v2.6.1
- MR Feature Tool v1.0.2103.2 Beta or higher
Target platform (please complete the following information)
- HoloLens 2
Additional context
Window 10, latest build, and latest cumulative updates as of 3/30/2021 Visual Studio 2019 16.9.3 (although not involved in this issue)
Additional information. I tested the configuration tool on 2019.4.2 and higher. I was in error on the configuration selections. In addition to the features selected in the documentation I had added the Spatial Audio and the Azure MR Services for Object Anchors. My findings:
- Following configuration exactly as documented works and the menu is added.
- Following the configuration and adding the Spatial Audio as a feature works and the menu is added.
- Following the configuration and adding the Azure Object Anchors to the above features fails with 2 errors and 6 warnings and it does not complete the process, not adding the menu item to Unity.
Errors: Library\PackageCache\com.microsoft.azure.object-anchors.runtime@64cc8af4365c-1617447405787\Runtime\Core\ObjectAnchorsWorldManager.cs(13,22): error CS0234: The type or namespace name 'ARFoundation' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Library\PackageCache\com.microsoft.azure.object-anchors.runtime@64cc8af4365c-1617447405787\Runtime\Core\ObjectAnchorsWorldManager.cs(65,45): error CS0246: The type or namespace name 'ARSessionStateChangedEventArgs' could not be found (are you missing a using directive or an assembly reference?)
Warnings Identifier uniqueness violation: 'Name:node_id4, Type:Mesh'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy)/OVRControllerPrefab (Missing Prefab), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy)/OVRControllerPrefab (Missing Prefab)/Transform, Type:Transform'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
@davidkline-ms Linking this to you.
@laultman,
This looks like it might be a path length issue (Unity is limited to 260 characters). Can you try with a project that is in the drive's root?
I will give it a shot. By the way Object Anchors is not available in Azure Government. We are building for USMC. Any ideas on that one? The documentation online at MS has you check the include previews and references 2.7.x mrtk. This does not appear to be available. Finally, I have tried the tutorial using OpenXR on Unity 2020.x LTS version and none of them work with spatial awareness. I have tried it at least a dozen times making absolutely sure that I am following the tutorial script EXACTLY. Spatial awareness does not function. As a control I followed the same procedure with Unity 2019.4.x LTS and it works as it should.
By the way here is my path that I was using in the testing above. C:\a\Unity\HL2 (I have run into the path length issue more than once.) I like the new Feature Tools a lot! I wish there were an easier way to manage all the cloning of profiles. I make a bunch of "starter" projects.
Tried it again Unity 2020.3.2, with project in the root "C:" no luck, must not be a path length unless you need to shorten some of the internal MRTK names.
Library\PackageCache\com.microsoft.azure.object-anchors.runtime@57e3d252327c-1617447405787\Runtime\Core\ObjectAnchorsWorldManager.cs(13,22): error CS0234: The type or namespace name 'ARFoundation' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Library\PackageCache\com.microsoft.azure.object-anchors.runtime@57e3d252327c-1617447405787\Runtime\Core\ObjectAnchorsWorldManager.cs(65,45): error CS0246: The type or namespace name 'ARSessionStateChangedEventArgs' could not be found (are you missing a using directive or an assembly reference?)
Identifier uniqueness violation: 'Name:node_id4, Type:Mesh'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy)/OVRControllerPrefab (Missing Prefab), Type:GameObject'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
Identifier uniqueness violation: 'Name:MRTK-Quest_OVRCameraRig/MRTK-Quest_OVRCameraRig/Missing Prefab (Dummy)/OVRControllerPrefab (Missing Prefab)/Transform, Type:Transform'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets.
I created a new issue for the OpenXR in Unity 2020 and MRTK 2.6.1 not working with Spatial Awareness, #9619.
More information on this issue. From my use, the issue seems to be confined to the Object Anchors insert as the process fails as described above, in every version of Unity I have tried 2019.4.2 and higher. If I do not include the Object Anchors selection the process completes.
Finally, I tried running the Feature Tools a second time on the same Unity project in 2019.4.23f1. The tool reported all the previously selected components as installed. The actual state of this is unknown. Unselecting the Object Anchors and re-selecting the rest of the features desired caused Unity to load something (do not know what) but the Feature Tool did not add the Mixed Reality Toolkit to the Unity main menu. It only seems to attempt to do this exactly once, on initial setup.
Thanks for the detailed follow up! Do you still see errors in the console? Unity generally does not run editor scripts (how MRTK adds the menu item) when there are any compile errors.
Unselecting the Object Anchors and re-selecting the rest of the features desired
Can you open the Unity Package Manager UI (Window > Package Manager) and remove the Object Anchors package? If that is still being imported, it may be what is blocking the MRTK from adding the menu.
If this solves what you are seeing, I will work with the Object Anchors team to debug their package (it may be missing dependencies).
Thanks!
@davidkline-ms, I will try your suggestion and report back. Likely will not be tomorrow, will be on base USMC for briefing on this project. Right now Object Anchors is not available in Azure Government so it seems to be a moot point. Stuck with QR.
@davidkline-ms
Library\PackageCache\com.microsoft.azure.object-anchors.runtime@64cc8af4365c-1617447405787\Runtime\Core\ObjectAnchorsWorldManager.cs(13,22): error CS0234: The type or namespace name 'ARFoundation' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)
Library\PackageCache\com.microsoft.azure.object-anchors.runtime@64cc8af4365c-1617447405787\Runtime\Core\ObjectAnchorsWorldManager.cs(65,45): error CS0246: The type or namespace name 'ARSessionStateChangedEventArgs' could not be found (are you missing a using directive or an assembly reference?)
This looks like an issue with the AOA package. It uses ARFoundation but doesn't appear to account for it not existing in the project.
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!