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
- Double separation lines are present in a kebab dropdown menu
- [URP] CommandBuffer: built-in render texture type 3 not found while executing warning is thrown when Game view is open and OpenGL is used
- User gets "Sorry...that page seems to be missing" when click a help icon
- Horizontal Scrollbar appears in the Inspector Window when the Volume Component is added
- Build Profiles - Feature Request: Editor restart button would improve the user experience
Add comment