VRC SDK can not be loaded because of 'Unity.Mathematics'

Hello everyone!

When I install Unity (2019.4.31f1) with the CompanionApp on my Win11 PC, the “VRChat SDK” tab shows up in Unity but only offers me to reload the SDK.
In the console I get errors regarding a missing assembly “Unity.Mathematics” which is installed.

When I click on “reload SDK”, it doesn’t help but the error messages of the console disappear (with the exception of the two Microsoft Visual C# info (?) messages).
I tried installing Unity and the SDK multiple times and ran the install and app as administrator, without any luck.

Maybe someone has an idea what the issue might be?

Thank you in advance!

image

My package manger looks different from yours. I tried launching from both Unity Hub and VCC to be sure.

Strange that my version seems to need some dependancies?
Did you install your Unity and SDK via the CompanionApp?

Could you please try updating your Mathematics package to version 1.2.6 in the package manager and seeing if that fixes the errors?

1 Like

I tried this before, but sadly it didn’t help.
I just did the update:

If you try one of our template repositories, does the same issue occur?

That would let us narrow down the issue.

I tried using the templates “template-udonsharp-main” and “template-avatar-main”, but it didn’t help.

When I open these new template projects using the Unity Hub, the entire “VRChat SDK” tab is missing.
I can see that at the start of the Unity Editor there are quite a bunch of imports going on.
When the startup is completed, the console doesn’t show any errors (besides of two messages about “Microsoft Visual C# Compiler”, which looks more like an info than an error.
Other than described in the online description, there is no popup message about “This project requires some VRChat Packages…”.
I can see in the project assets the “VRChat Package Bootstrapper” with the “License” and “package” files, as well as the “Bootstrap” and “VRChat.Bootstrapper.Editor Import Settings” files.

When I “migrate” this project using the VCC I get the same errors as if I created a new project in the VCC in the first place.
(So I see the “VRChat SDK” tab but only with the reload option, as well as the error messages in the console about the missing “mathmatics” packages.)

With regards

Tobias

It sounds like this issue may be related to Unity itself.

You may want to check Unity’s Editor.log file to track down the issue: Unity - Manual: Log files

You could also try reimporting the SDK with the ‘Reimport All’ option, and seeing if that affects the outcome.
Unity_dbB76r4Dgw

When I have a look into the editor.log, I found the same errors I can see in the “Console” Window in the editor itself, right after the importing has finished:

Error: Could not load signature of VRC.Dynamics.MathUtil:DistancePointToPlane due to: Could not load file or assembly ‘Unity.Mathematics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. assembly:Unity.Mathematics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type: member:(null) signature:
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoAttributeHelpers.cpp Line: 363)

Unloading broken assembly Packages/com.vrchat.base/Runtime/VRCSDK/Plugins/VRC.Dynamics.dll, this assembly can cause crashes in the runtime
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoManager.cpp Line: 1233)

Native extension for WindowsStandalone target not found
Refreshing native plugins compatible for Editor in 4.10 ms, found 5 plugins.
Preloading 1 native plugins for Editor in 0.62 ms.
VRCBuildPipelineCallbacks failed to load a type in assembly ‘VRC.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. If this is Assembly-CSharp it’s just Unity being in the middle of loading.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogWarning (object)
VRC.SDKBase.Editor.BuildPipeline.VRCBuildPipelineCallbacks:Initialize ()
System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.MethodBase:Invoke (object,object[])
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadMethodAttributes ()

Later in the log I see some problems, resolving the Unity3d Website (but I would assume that this shouldn’t be causing the issue?):

Curl error 6: Could not resolve host: cdp.cloud.unity3d.com

Interestingly enough, later in the Log, when I tried to reimport the package, the error message above doesn’t appear:

Start importing Packages/com.unity.collab-proxy/Editor/PlasticSCM/Assets/Layouts/ProgressControlsForDialogs.uxml using Guid(feccc3dff22272744a267246ae760a73) Importer(-1,00000000000000000000000000000000)
Done importing asset: ‘Packages/com.unity.collab-proxy/Editor/PlasticSCM/Assets/Layouts/ProgressControlsForDialogs.uxml’ (target hash: ‘64b4e40f2feb68b6a4cc0aa3e2e2320f’) in 0.010580 seconds
Launched and connected shader compiler UnityShaderCompiler.exe after 0.02 seconds
Refreshing native plugins compatible for Editor in 0.61 ms, found 5 plugins.
Preloading 1 native plugins for Editor in 0.08 ms.
Refresh completed in 10.841692 seconds.
RefreshInfo: RefreshV2(ForceSynchronousImport)
RefreshProfiler: Total: 10839.567ms

Sadly it still has no positive effect and the “VRChat SDK” still just offers to “reload”.

I put the editor.log in the attachments.

Thank you for your help!

With regards

Tobias

(Attachment Editor.log is missing)

When I have a look into the editor.log, I found the same errors I can see in the “Console” Window in the editor itself, right after the importing has finished:

Error: Could not load signature of VRC.Dynamics.MathUtil:DistancePointToPlane due to: Could not load file or assembly ‘Unity.Mathematics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. assembly:Unity.Mathematics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type: member:(null) signature:
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoAttributeHelpers.cpp Line: 363)

Unloading broken assembly Packages/com.vrchat.base/Runtime/VRCSDK/Plugins/VRC.Dynamics.dll, this assembly can cause crashes in the runtime
(Filename: C:\buildslave\unity\build\Runtime/Mono/MonoManager.cpp Line: 1233)

Native extension for WindowsStandalone target not found
Refreshing native plugins compatible for Editor in 4.10 ms, found 5 plugins.
Preloading 1 native plugins for Editor in 0.62 ms.
VRCBuildPipelineCallbacks failed to load a type in assembly ‘VRC.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. If this is Assembly-CSharp it’s just Unity being in the middle of loading.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogWarning (object)
VRC.SDKBase.Editor.BuildPipeline.VRCBuildPipelineCallbacks:Initialize ()
System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.MethodBase:Invoke (object,object[])
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadMethodAttributes ()

Later in the log I see some problems, resolving the Unity3d Website (but I would assume that this shouldn’t be causing the issue?):

Curl error 6: Could not resolve host: cdp.cloud.unity3d.com

Interestingly enough, later in the Log, when I tried to reimport the package, the error message above doesn’t appear:

Start importing Packages/com.unity.collab-proxy/Editor/PlasticSCM/Assets/Layouts/ProgressControlsForDialogs.uxml using Guid(feccc3dff22272744a267246ae760a73) Importer(-1,00000000000000000000000000000000)
Done importing asset: ‘Packages/com.unity.collab-proxy/Editor/PlasticSCM/Assets/Layouts/ProgressControlsForDialogs.uxml’ (target hash: ‘64b4e40f2feb68b6a4cc0aa3e2e2320f’) in 0.010580 seconds
Launched and connected shader compiler UnityShaderCompiler.exe after 0.02 seconds
Refreshing native plugins compatible for Editor in 0.61 ms, found 5 plugins.
Preloading 1 native plugins for Editor in 0.08 ms.
Refresh completed in 10.841692 seconds.
RefreshInfo: RefreshV2(ForceSynchronousImport)
RefreshProfiler: Total: 10839.567ms

Sadly it still has no positive effect and the “VRChat SDK” still just offers to “reload”.

I put the editor.log in the attachments.

Thank you for your help!

With regards

Tobias

(Attachment Editor.zip is missing)

Hmm, that seems to indicate that there may be an issue with Unity! Here are a couple more things you can try.

  1. You may have tried this already, but - opening and closing Unity can sometimes resolve import issues.
  2. When choosing a location for your project, make sure that it does not exceed Windows’s path length limit. (256 characters). You may also want to avoid OneDrive folders!
  3. It may still be related to Unity’s Mathematics or Burst package.
  4. Go to the packages folder, and see if VRChat’s SDK is actually present. (It should, especially if you used one of our templates)

Let me know how it goes!

Thank you for the suggestions! (And sorry for the delay!)

  1. I lost count of how often I restarted Unity…

  2. I tried this by using the “C:\temp” folder for the project files

  3. I think so too, but I tried different approaches on that (updating the packages inside of unity; using a different package from github; using a package from a friend who is running VRC SDK successfully…)

!!! 4. The folder “C:\Users*user*\AppData\Local\Unity\cache\packages\packages.unity.com” does contain the folders like “com.unity.mathematics@1.2.6” and such, but no hint of a VRC SDK folder! is there a way to “import” it there manually?

Thank you so much for your help!

Ah, it shouldn’t be in Unity’s package cache - it should be in your project’s Packages folder, next to your Assets folder.

Ah I see, well “unfortunatelly” the “com.vrchat.avatars”, “com.vrachat.base” and “com.vrchat.core.vpm-resolver” folders are in the project folder…

By ‘project folder’, do you mean YourProjectName/Packages? Because that’s correct!

Hi there! I appear to have the exact same issue, which strangely enough occurred after a creator companion update in early april. The exact messages vary as I attempt to fix it, but the primary issue focuses around blend trees.

For example, this is a character with physbones on the nose, and I use blendtrees to adjust the transforms. However after the start of April, of however I try to rearrange Unity and the project and CC, I always have this issue. Note that these animations don’t directly edit the physbone component, ironically the animations for those work fine.

This is the most recent set of errors I have. This is a fresh project with a backup of the previous project put into it.

Once in play mode, I recieve this further issues:

At time of writing report, the animations appear to be working fine as I learned that deleting the blend tree and recreating it works as a temporary fix, before reverting to the issue demonstrated in the first image, with no clear occurrence as to what caused the change.

I had this same problem. It turned out that my DNS server was blocking cdp.cloud.unity3d.com. I just had to whitelist it to fix the issue.

how do you white list it ? not sure how to go into my dns server settings

What DNS server do you have? If you don’t know the answer, you probably don’t have one.

Stuff done in the name of ad blocking and security are good candidates for investigation. Something Like a “pi hole” ad blocker might have this particular unity server blocked because analytics.

I appear to get a blank page instead of a browser error when I clicked the link. So good sign I’m not blocked from it.