Problem with configuration after migration Hololens 2 app

Hi, After following the migration and sdk installation guides i cannot fix one issue. And i am getting some errors in editor for Mixed Reality Toolkit Foundation(tried multiple versions for 2.8.X). errors are in file UnityARCameraSettings.cs

Unity Editor version: 2022.3.9f
ML2 OS version:----
MLSDK version:1.11.0
Host OS: Windows

Error messages from logs (syntax-highlighting is supported via Markdown):
Library\PackageCache\com.microsoft.mixedreality.toolkit.foundation@251fc689f36f\Providers\UnityAR\UnityARCameraSettings.cs(166,53): error CS0311: The type 'UnityEngine.XR.ARFoundation.ARSessionOrigin' cannot be used as type parameter 'T' in the generic type or method 'ComponentExtensions.EnsureComponent(GameObject)'. There is no implicit reference conversion from 'UnityEngine.XR.ARFoundation.ARSessionOrigin' to 'UnityEngine.Component'.

Library\PackageCache\com.microsoft.mixedreality.toolkit.foundation@251fc689f36f\Providers\UnityAR\UnityARCameraSettings.cs(166,53): error CS0012: The type 'XROrigin' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.XR.CoreUtils, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Library\PackageCache\com.microsoft.mixedreality.toolkit.foundation@251fc689f36f\Providers\UnityAR\UnityARCameraSettings.cs(201,17): error CS0012: The type 'XROrigin' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.XR.CoreUtils, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

Library\PackageCache\com.microsoft.mixedreality.toolkit.foundation@251fc689f36f\Providers\UnityAR\UnityARCameraSettings.cs(201,53): error CS1503: Argument 1: cannot convert from 'UnityEngine.XR.ARFoundation.ARSessionOrigin' to 'UnityEngine.Object'

Do you mind sharing the packages in your project and their versions? You may want to try closing your project and deleting the Library folder from your project's root directory to reimport/ re-initialize the installed packages.

Hi. I have deleted the Library folder for multiple times when i was experimenting with different MRTK versions.

Here are packages from package manager.

Interesting, it looks like your Assembly Definition asset was unlinked. Select the MRTKUnityAR.asmdef file inside your Unity project. It should be located in a spot with a path similar to

Assets/MRTK/Providers/UnityAR/MRTKUnityAR.asmdef

or

/Packages/com.microsoft.mixedreality.toolkit.foundation/Providers/UnityAR/MRTK.UnityAR.asmdef

Then, in the inspector, make sure there are not missing Assembly Definition References.

Hi, there was no missing references, the file looks like the one shown in your screen.

Do you mind trying to remote the MRTK OpenXR and OpenXR packages from the project? Some user's have reported compatibility issues the OpenXR package when using MRTK 3 and I suspect that this issue is related to that as well.

Tried that(removed library folder etc.), and it didn't work. Maybe my package versions are somewhat incompatible?

Solved this problem, with starting new project, configuring empty for ML2 and importing assets and some configuration from original project. Something is probably corrupted in my old project.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.