0
Pending Review

"Failed to load types in assembly" warnings

Rabadash8820 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 1

I've been seeing `ReflectionTypeLoadException` warnings in my project for some time now, across several versions of Unity 2018 and the last two versions of Bolt.  I've already restarted Unity, reimported all assets, re-run the Bolt setup wizard, and rebuilt Unit Options more times than I can count, but still these warnings persist.

Below is a screenshot of the warnings.  A few notes:

  • I believe that the error about UnityEngine.Analytics being broken is unrelated to this issue.  I think it has something to do with it being a .NET 3.x assembly in my project targeting .NET 4.x, which should be resolved in 2018.3, but I'm still on 2018.2.
  • The HighHandHoldem.Data assembly is the one that I'm concerned about.  This assembly comes from a .NET Standard 2.0 project that I built in Visual Studio, and then exported to the Unity project with a post-build event; i.e., my scripts are not stored in the Unity project.
  • Not sure if they're related, but I'm also concerned about those "Failed to define" warnings, as those are complaining about members that no longer exist because I deleted them from my code.  I thought that rebuilding the Unit Options would solve this...but it didn't.

Please let me know if there is anything else I can do to troubleshoot.  Thanks in advance!

Bolt Version:
1.4.0f11
Unity Version:
2018.2.20f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Rabadash,

UnityEngine.Analytics: Have you tried uninstalling and reinstalling the Analytics package from the Unity Package Manager? It seems like it may be either outdated or corrupted.

Custom .NET Assembly: Are you able to use the types from your .NET Standard assembly outside Bolt? If they are .NET Core assemblies, those are just not supported by Unity. I know for a fact that Bolt supports precompiled assemblies though, as it is how Bolt itself ships.

Failed to define warnings: These will happen if you have units in your graphs that referred to these types or members, and they have gone missing from your codebase. In order to get rid of the warnings, you'd have to either bring back the types/members or delete the nodes from your graph. They should be easy to spot, as they will be colored red.