Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

[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.