[1081704] Script missing when adding to gameobject

Case 1081704, beta3. When I add a script to a gameobject the inspector says “Missing” for the script and the console gets the following warning:

GameObject (named ‘GameObject’) references runtime script in scene file. Fixing!
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

Additionally when I press play the console gets errors like:

TypeLoadException: Could not resolve type with token 01000036 (from typeref, class/assembly Utils, System, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)

And additionally the console is occasionally spammed with mysterious TypeLoad reflection errors from random/various classes/fields like:

CameraController/d__38 : Invalid type CameraController for instance field CameraController+d__38:<>4__this

The minimal project plays fine and can even make builds fine though. This all gets fixed if I delete all the asmdef files in my project.

Are asmdef files unusable in 2018.3b3 or what?

Hi

Thanks for reporting the issue, we will look into it.

Sounds like it might be the same issue as:

Since your editor log contains the following:

Error while loading types from assembly Player, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null: System.Reflection.ReflectionTypeLoadException: Exception of type ‘System.Reflection.ReflectionTypeLoadException’ was thrown.
at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at UnityEngine.Experimental.UIElements.VisualElementFactoryRegistry.DiscoverFactories () [0x0006d] in C:\buildslave\unity\build\Modules\UIElements\UXML\VisualElementFactoryRegistry.cs:54

1 Like