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
It seems this bug is not resolved.
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%
Is there only one met the same problem?
Did you file a bug report for this? I’m on 5.2.2p4 and seeing what I think is this same issue you’re describing. If I change the namespace of a monobehavior, it breaks the reference in AssetBundles (even if I delete and rebuild the bundles) and the only way to get around it is to remove the monobehavior from the affected prefabs and re-add it.
I ask many times in here:
http://forum.unity3d.com/threads/bug-the-new-assetbundle-in-5-x-can-not-keep-reference-to-script-when-it-change-name.327721/#post-2142908
and here:
http://forum.unity3d.com/threads/bug-the-new-assetbundle-in-5-x-can-not-keep-reference-to-script-when-it-change-name.333090/#post-2181280