Search Issue Tracker
Won't Fix
Votes
1
Found in
2017.1.0p4
Issue ID
950503
Regression
No
GameObjects lose script reference when they are loaded from AssetBundle into another project
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Add comment