- Home /
Can not load script from AssetBundle which has namespace.
I am using the unity5.0.1f1, and I met an error when I attach a script with namespace onto a GameObject in a scene, and I load the scene from AssetBundle in unity5.x, the script is missing reference. But When I remove the namespace, its work fine. There has a lot of extension using namespace include mine code, it seems impossible to remove all namespace in code. Is is an already known bug in some patch fixed it, or I am missing something? I test it using the AssetBundle demo come from http://files.unity3d.com/vincent/assetbundle-demo/users_assetbundle-demo.zip
I change the script class name, and the reference to prefab is broken. If I remove the script which missing on the prefab, re-add it onto the prefab, and rebuild the AssetBundle, everything goes OK again. I dig into the prefab file and see just the fileID of the MonoBehavior is changed. You can repeat this 100%
BTW, I met this bug on MacOS
Your answer
![](https://koobas.hobune.stream/wayback/20220613195942im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Exporting assets from Unity 5 to Unity 4 1 Answer
Errors When Loading AssetBundles With Concurrent WWW Calls (Unity5) 0 Answers
assetbundle in Unity 5.6 can't load png files? 0 Answers
AssetBundles Unity5 (No AssetBundle has been set for this build) 3 Answers
Program with BuildAssetBundles in Unity 5.0 asset bundle system 0 Answers