How to handle Asset Store - Plugins?

I am working on an Asset Store submission, I have created all the background stuff and included my “folder” of resources. The problem is, I need to also include two plugins that are used by the asset at runtime.

There is nothing in the Asset Store Tools/Uploader that allows me to specify plugins; two DLLs. How do I include them in my package?

I figured out how to solve this problem; not sure if this is the optimal way to do it, but this is what I found out.

I always assumed that Plugins had to be in “/Assets/Plugins”, but they can be in “/Assets/{Library}/Plugins” too, (where {library} is the name of a subfolder off of “/Assets” containing your asset, and it works fine at runtime.

For anybody else reading this, I’ve tested this assumption in both 32-bit and 64-bit Windows (will post OSX findings later; unless somebody else knows). If you want to include a 32-bit and 64-bit DLL in your distribution, then you must create a separate 32-bit and 64-bit DLL libraries, with different file names, then use a conditional in your player settings to decide which DLL version to link to at runtime. The different names are required in order to put them in the same plugins folder and helps diagnose problems. The other thing that helps is explicitly setting the DLL as x86 or x86_64.

#if SYMBOL32
[DllImport("DLL-32-name", EntryPoint = "entry-point-name", CallingConvention=CallingConvention.Cdecl)]
public static extern IntPtr InternalName (IntPtr stmt, int index);
#endif

#if SYMBOL64
[DllImport("DLL-64-name", EntryPoint = "entry-point-name", CallingConvention=CallingConvention.Cdecl)]
public static extern IntPtr InternalName (IntPtr stmt, int index);
#endif