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
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Active Targets section text in Graph Inspector is truncated despite available space
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
Add comment