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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment