Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[1081704] Script missing when adding to gameobject

Discussion in '2018.3 Beta' started by Muuuuo, Sep 27, 2018.

  1. Muuuuo

    Muuuuo

    Joined:
    Apr 16, 2015
    Posts:
    57
    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/<SmoothAttachRoutine>d__38 : Invalid type CameraController for instance field CameraController+<SmoothAttachRoutine>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?
     
  2. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    Hi

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

    Sounds like it might be the same issue as:
    https://issuetracker.unity3d.com/is...reflection-to-get-all-types-in-all-assemblies

    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 <ac823e2bb42b41bda67924a45a0173c3>:0
    at UnityEngine.Experimental.UIElements.VisualElementFactoryRegistry.DiscoverFactories () [0x0006d] in C:\buildslave\unity\build\Modules\UIElements\UXML\VisualElementFactoryRegistry.cs:54
     
    Muuuuo likes this.