SQLite - runs perfect in editor, doesn't get included into standalone project

I’m using SQLite for my project (using Unity Indie), but I’m having some issues with putting together a build. Everything works fine in the Editor, but when I make a stand-alone build, the program can’t find sqlite3.dll (which Mono.Data.SQLite depends on). The code I’m using is the code I’m putting together here:
http://www.unifycommunity.com/wiki/index.php?title=Sqlite

So far, I’ve found 2 workarounds, but I’m hoping for a better answer on how to make a project that I can simply hit ‘Build’ and get everything working.

1 - If I add sqlite3.dll to my Assets\Plugins folder, the stand-alone project works perfectly. However, in the Editor, when I hit ‘Play’, I get a “License error. Plugins are only supported in Unity Pro!”. However, the program still works fine in the Editor.

2 - I can leave sqlite3.dll out of my project folder, and the Editor works fine - no License errors thrown. Then I can include sqlite3.dll into the base folder of my built project, in the same folder as the .exe, and it works fine. No more license errors. However, I’d rather have something where I don’t have to always remember to package my exectuables with it with sqlite3.dll, and have Unity do that for me instead.

So my question is, is there a better way to get around this issue, or is there a way to improve either of my work-arounds?

1 - Only cause there is currently a bug with correctly detecting dependencies. If it worked right without the bug, it would not work anywhere as any usage of System.Runtime.InteropServices (required to talk to any unmanaged DLL as the sqlite one) would then be blocked without Pro.
Has been a long time trick to work around this artificial non-pro limitation cause the Unity compiler is bugged and incapable to just kill any assembly with “using System.Runtime.InteropServices”, it only checks for its presence if it compiles the script itself …

2 - Post Process Build script that copies it as last step of the build solves that :slight_smile: