Unrecognized assets cannot be included in AssetBundle: "....dll".
Hi Community im strugling with my upload of some asset iv made. The error when uploading the package that i get, goes like this: Unrecognized assets cannot be included in AssetBundle: "Assets/Resources/*.dll".
Im sure the problem lies with the .dll file, but i was told that .dll files are usable in unity and they work like they should, but uploading them might be a different thing.
Does anyone know what i should do about that? Greetings.
Answer by LessThanEpic · Aug 25, 2015 at 04:11 AM
Dlls work fine in Unity, but script files (including dll's) cannot be included in an Asset Bundle. Put all your scripts somewhere else in your project and only put stuff like meshes, prefabs, textures, etc. into asset bundles. Game objects and prefabs in your asset bundle can have scripts attached to them, but you can't put the scripts themselves into the asset bundle.
EDIT: See PappyA's answer below. I was mistaken about scripts in Asset Bundles. They work on some platforms, but not on iOS.
Answer by VinzenzBauer · Aug 25, 2015 at 03:43 PM
Thanks for that info, but how are Script-Files included if you were to upload an Editor-Plugin that only has Script-codes?
Answer by PappyA · May 10, 2016 at 11:56 PM
@LessThanEpic This statement is incorrect based on the documentation. http://docs.unity3d.com/Manual/scriptsinassetbundles.html
DLLs (assemblies) are supposed to be supported in Asset bundles and can be loaded and utilized at run time via reflection (on supported platforms). This is a bug, and I'm also experiencing it in Unity 5.3.2p4 when trying to add DLLs to asset bundles.
Has anyone else found a work around yet? What about you @Unity?
Good call. Has that always been available? I've always done mobile and that approach doesn't work on iOS, so I never realized it was an option.
rename .dll to byte . Include .byte in asset bundle Then Load it as TextAsset Profit!
Thank you @Postive7 but sadly it still fails in the same way.
I'll get on the horn with the folks @Unity.
@LessThanEpic Yes shipping DLLs in asset bundles has been supported for a very long time. Never been support on iOS dues to the AOT compilation and lack of reflection at runtime.
Ciao for now
I'll test it with 5.3.4 tonight it was working fine last time I used it Sorry rename .dll to .bytes It still works here.
$$anonymous$$tl is plain text so it should work the same as any text format. if everyhing fails byte[] array should work. But Unity doesn't support mtl file as far as I know (unless there are some changes since Unity 5.6 or you use an extension that supports it)
Answer by kelloh · Jul 14, 2016 at 06:27 PM
go.AddComponent(type) is fine, but what about maintaining links to MonoBehaviours in your scene objects?