Share via

HoloLens2 unity development error

梦杰 李 6 Reputation points
2022-09-01T01:37:25.213+00:00

I'm using unity to develop HoloLens2 and it will report an error when I run it, please help me,I don't know what's wrong
error is:

Objects are trying to be loaded during a domain backup. This is not allowed as it will lead to undefined behaviour!

UnityEngine.Shader:Find (string)
Microsoft.MixedReality.Toolkit.Utilities.StandardShaderUtility:get_MrtkStandardShader () (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@321dd3d08b64/Core/Utilities/StandardShader/StandardShaderUtility.cs:27)
Microsoft.MixedReality.Toolkit.UI.ScaleOffsetColorTheme:GetDefaultThemeDefinition () (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@321dd3d08b64/SDK/Features/UX/Scripts/VisualThemes/ThemeEngines/ScaleOffsetColorTheme.cs:32)
Microsoft.MixedReality.Toolkit.UI.ThemeDefinition:GetDefaultThemeDefinition (System.Type) (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@321dd3d08b64/SDK/Features/UX/Scripts/VisualThemes/Core/ThemeDefinition.cs:134)
Microsoft.MixedReality.Toolkit.UI.ThemeDefinition:UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize () (at Library/PackageCache/com.microsoft.mixedreality.toolkit.foundation@321dd3d08b64/SDK/Features/UX/Scripts/VisualThemes/Core/ThemeDefinition.cs:146)

HoloLens | Development
HoloLens | Development

The process of creating immersive mixed reality applications for Microsoft HoloLens,


1 answer

Sort by: Most helpful
  1. Zuocheng Wang - MSFT 3,096 Reputation points Microsoft External Staff
    2022-09-06T06:44:31.223+00:00

    Hello, Welcome to Microsoft Q&A,

    I tested with MRTK official Examples on Unity 2021.3.4f1c1, but I didn't reproduce the issue. If you are using MRTK 2.8.x to develop HoloLens, Please make sure you have configured the project correctly according to Set up a new OpenXR project with MRTK - Mixed Reality | Microsoft Learn and Unity 2020.3 LTS is recommended. There are some reports from Unity Community indicating it can be an occasional issue on Unity. If you can reproduce it constantly, please seek support from Unity.

    ----
    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.