5.x BuildAssetBundles and dll assemblies

I’m trying to use the new 5.x way of doing things in creating assetbundles. I’m running into difficulties with including script dlls in these bundles.

If I simply use the editor to set an AssetBundle name, then call BuildPipeline.BuildAssetBundles(“path”), I get an error saying that DLL files are “unrecognized”. So now I’ve created logic to rename DLL files as BYTES files. This is where the problem comes in… when I rename the file via script, the previously set AssetBundle is reset to ‘None’, so when I call BuildAssetBundles(), it’s not getting included in any bundle.

How can I use C# scripting to get/set/preserve the AssetBundle as set in the editor? I didn’t see any API functions that I’d hoped for such as maybe AssetDatabase.AddFileToAssetBundle(), or some such. Did I miss something?

Thanks in advance!

Not sure if this thread should be deleted or not, but I’ve reposted this question on unity answers: in Unity 5, how can I get/set an asset's AssetBundle assignment via scripting? - Questions & Answers - Unity Discussions

If anyone’s interested, I was able to solve my own problem, as detailed here: