Search Issue Tracker

Won't Fix



Found in


Issue ID




GameObjects lose script reference when they are loaded from AssetBundle into another project

Asset Bundles


To reproduce:
1. Open attached project "ScriptFailureDemoProject" in Unity
2. Make sure "TestScene" scene is opened and enter the play mode
3. Notice that there were "AssetBundleLoadedScene" loaded
4. Expand this scene and select ObjectWithScriptAttached
5. Notice error that associated script can't be loaded

Expected: Attached script should be loaded successfully.

Reproduced with: 2017.1.0f3, 2017.1.1p3, 2017.2.0b1
Earlier versions (5.5.x, 5.6.x) there are some issues with loading AssetBundle
2017.3 freeze when loading scene from AssetBundle

Won't fix:
When a MonoBehaviour is serialized out, we store type information at that point for proper linking of the object at runtime. This type information includes the Class/Struct Name, Namespace, and Assembly. In the case of this example, the loose script in the project has an Assembly of "Assembly-CSharp.dll", and when it is compiled as part of a DLL, the assembly name changes. Thus it will not link at runtime. To fix this, you should use the compiled DLL assembly in the project building the asset bundles instead of the loose script.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.