i got a problem in unity 3.4 when importing assets bundle.
i got this error (for EVERY script it has to load):
The class defined in script file named 'ScrollBar' does not match the file name!
UnityEngine.Object:Instantiate(Object)
$:MoveNext() (at Assets/scripts/loadlib.js:13)
note that is is an *.js… so it is not that my class and script name don’t match
how can i fix this?
The only workaround for including additional code in asset bundles is to first build the new code to .net assemblies, then rename the resulting assembly to .txt, put it in your assets folder and then include it as a TextAsset in your asset bundle. Assembly building example here: http://angryant.com/general/tipsandtricks/assembling-and-assimilating/
yes… its a bit over my head…
i found another way around though…
the package what i exported with the assetsbundle does not include any scripts…
so put the scripts in the project what has to load the assetsbundle… after loading the assetsbundle, it can find the scripts. Done!
you should only build asset bundles from the project for which they are anyway, otherwise you will for sure struggle over other problems too as the data in the asset bundle, if they have relationships of any form (like own components, shaders), work only on the one project they come from