I have read the manual “Including scripts in AssetBundles” so does that means the script components of prefabs in AssetBundle is unavailable?
I make a prefab that contains meshes, materials and script components and build it in an AssetBundle. When I load the AssetBundle in another project, I got meshes and materias rendered correctly but the script didn’t work at all.
The script component is still there on the object that instantiated from the prefab load from the AssetBundle, but warnings
as “The class defined in script file named ‘World’ does not match the file name!” was shown when I call AssetBundle.Load() .
And also I use AssetBundle.CreateFromFile() to load the AssetBundle file. This function failed when the AssetBundle file was build
using option BuildOptions.None, BuildOptions.UncompressedAssetBundle is required. So what’s the difference between AssetBundle.CreateFromFile and WWW with a “file://” prifex? Is this the cause of the script component didn’t work or any kind of
scripts is unavailable in AssetBundles?