diff --git a/Example/.gitignore b/Example/.gitignore
new file mode 100644
index 0000000..bd1a02d
--- /dev/null
+++ b/Example/.gitignore
@@ -0,0 +1,30 @@
+### Unity ###
+[Ll]ibrary/
+/[Tt]emp/
+[Oo]bj/
+/[Bb]uild/
+[Bb]in/
+ProjectSettings/
+
+# Autogenerated VS/MD solution and project files
+*.csproj
+*.unityproj
+*.sln
+*.suo
+*.tmp
+*.user
+*.userprefs
+*.pidb
+*.booproj
+
+# Unity3D generated meta files
+*.pidb.meta
+
+# Unity3D Generated File On Crash Reports
+sysinfo.txt
+
+# Unity3d Generated files when building
+*.pfx
+*.pfx.meta
+UWP/
+!Assets/Plugin/**/*.dll
\ No newline at end of file
diff --git a/Example_unity5/Assets/Plugins.meta b/Example/Assets/Plugins.meta
similarity index 67%
rename from Example_unity5/Assets/Plugins.meta
rename to Example/Assets/Plugins.meta
index 6a537b8..1ef7e1f 100644
--- a/Example_unity5/Assets/Plugins.meta
+++ b/Example/Assets/Plugins.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: bc89bc61e2dc66d46aae1056255cf946
+guid: 6672b8bdaedd568468bd6e5a724edba2
folderAsset: yes
-timeCreated: 1445131378
+timeCreated: 1453576960
licenseType: Free
DefaultImporter:
userData:
diff --git a/Example_unity5/Assets/Plugins/Android.meta b/Example/Assets/Plugins/Android.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/Android.meta
rename to Example/Assets/Plugins/Android.meta
diff --git a/Example_unity5/Assets/Plugins/Android/libs.meta b/Example/Assets/Plugins/Android/libs.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/Android/libs.meta
rename to Example/Assets/Plugins/Android/libs.meta
diff --git a/Example/Assets/Plugins/Android/libs/arm64-v8a/libsqlite3.so b/Example/Assets/Plugins/Android/libs/arm64-v8a/libsqlite3.so
new file mode 100644
index 0000000..1e2ce2d
Binary files /dev/null and b/Example/Assets/Plugins/Android/libs/arm64-v8a/libsqlite3.so differ
diff --git a/Example_unity5/Assets/Plugins/Android/libs/armeabi-v7a.meta b/Example/Assets/Plugins/Android/libs/armeabi-v7a.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/Android/libs/armeabi-v7a.meta
rename to Example/Assets/Plugins/Android/libs/armeabi-v7a.meta
diff --git a/Example/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so b/Example/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so
new file mode 100644
index 0000000..2c6e2bf
Binary files /dev/null and b/Example/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so differ
diff --git a/Example_unity4x/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta b/Example/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta
similarity index 100%
rename from Example_unity4x/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta
rename to Example/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta
diff --git a/Example_unity5/Assets/Plugins/Android/libs/x86.meta b/Example/Assets/Plugins/Android/libs/x86.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/Android/libs/x86.meta
rename to Example/Assets/Plugins/Android/libs/x86.meta
diff --git a/Example/Assets/Plugins/Android/libs/x86/libsqlite3.so b/Example/Assets/Plugins/Android/libs/x86/libsqlite3.so
new file mode 100644
index 0000000..9d08844
Binary files /dev/null and b/Example/Assets/Plugins/Android/libs/x86/libsqlite3.so differ
diff --git a/Example_unity5/Assets/Plugins/Android/libs/x86/libsqlite3.so.meta b/Example/Assets/Plugins/Android/libs/x86/libsqlite3.so.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/Android/libs/x86/libsqlite3.so.meta
rename to Example/Assets/Plugins/Android/libs/x86/libsqlite3.so.meta
diff --git a/Example_unity5/Assets/Plugins/WP8.meta b/Example/Assets/Plugins/WSA.meta
similarity index 57%
rename from Example_unity5/Assets/Plugins/WP8.meta
rename to Example/Assets/Plugins/WSA.meta
index dceb419..474c5be 100644
--- a/Example_unity5/Assets/Plugins/WP8.meta
+++ b/Example/Assets/Plugins/WSA.meta
@@ -1,8 +1,8 @@
fileFormatVersion: 2
-guid: c333c2b657470c94d9fc5d92a639393d
+guid: 3e1310ff5b122f347a943bad24333d4f
folderAsset: yes
-timeCreated: 1445131378
-licenseType: Free
+timeCreated: 1507670483
+licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
diff --git a/Example_unity5/Assets/Plugins/WP8/ARM.meta b/Example/Assets/Plugins/WSA/ARM.meta
similarity index 57%
rename from Example_unity5/Assets/Plugins/WP8/ARM.meta
rename to Example/Assets/Plugins/WSA/ARM.meta
index 770d44a..925ac45 100644
--- a/Example_unity5/Assets/Plugins/WP8/ARM.meta
+++ b/Example/Assets/Plugins/WSA/ARM.meta
@@ -1,8 +1,8 @@
fileFormatVersion: 2
-guid: 9e182245f94284645b5ea2d1d93d5aab
+guid: d5a4eb770a3e85941bd12132039ab956
folderAsset: yes
-timeCreated: 1445131378
-licenseType: Free
+timeCreated: 1507670500
+licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
diff --git a/Example/Assets/Plugins/WSA/ARM/sqlite3.dll b/Example/Assets/Plugins/WSA/ARM/sqlite3.dll
new file mode 100644
index 0000000..53aea09
Binary files /dev/null and b/Example/Assets/Plugins/WSA/ARM/sqlite3.dll differ
diff --git a/Example/Assets/Plugins/WSA/ARM/sqlite3.dll.meta b/Example/Assets/Plugins/WSA/ARM/sqlite3.dll.meta
new file mode 100644
index 0000000..af757b5
--- /dev/null
+++ b/Example/Assets/Plugins/WSA/ARM/sqlite3.dll.meta
@@ -0,0 +1,126 @@
+fileFormatVersion: 2
+guid: 0268b9f97df6a83468be4b296cf6af28
+timeCreated: 1507670500
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: ARM
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Example/Assets/Plugins/WSA/x64.meta b/Example/Assets/Plugins/WSA/x64.meta
new file mode 100644
index 0000000..83b0b9d
--- /dev/null
+++ b/Example/Assets/Plugins/WSA/x64.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: e14810dc75ddd4e4f9bb7b92989cb58b
+folderAsset: yes
+timeCreated: 1507670500
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Example/Assets/Plugins/WSA/x64/sqlite3.dll b/Example/Assets/Plugins/WSA/x64/sqlite3.dll
new file mode 100644
index 0000000..63096c1
Binary files /dev/null and b/Example/Assets/Plugins/WSA/x64/sqlite3.dll differ
diff --git a/Example/Assets/Plugins/WSA/x64/sqlite3.dll.meta b/Example/Assets/Plugins/WSA/x64/sqlite3.dll.meta
new file mode 100644
index 0000000..51ab767
--- /dev/null
+++ b/Example/Assets/Plugins/WSA/x64/sqlite3.dll.meta
@@ -0,0 +1,126 @@
+fileFormatVersion: 2
+guid: 1e46d058e8bdac745970fdfabe7e67ce
+timeCreated: 1507670500
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: X64
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Example_unity5/Assets/Plugins/WP8/x86.meta b/Example/Assets/Plugins/WSA/x86.meta
similarity index 57%
rename from Example_unity5/Assets/Plugins/WP8/x86.meta
rename to Example/Assets/Plugins/WSA/x86.meta
index 2193627..7587a2b 100644
--- a/Example_unity5/Assets/Plugins/WP8/x86.meta
+++ b/Example/Assets/Plugins/WSA/x86.meta
@@ -1,8 +1,8 @@
fileFormatVersion: 2
-guid: 730307c32c78a1d47af69464cf2fc372
+guid: 9f579691124bfd24a81afafa4c8a09c1
folderAsset: yes
-timeCreated: 1445131378
-licenseType: Free
+timeCreated: 1507670500
+licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
diff --git a/Example/Assets/Plugins/WSA/x86/sqlite3.dll b/Example/Assets/Plugins/WSA/x86/sqlite3.dll
new file mode 100644
index 0000000..6667321
Binary files /dev/null and b/Example/Assets/Plugins/WSA/x86/sqlite3.dll differ
diff --git a/Example/Assets/Plugins/WSA/x86/sqlite3.dll.meta b/Example/Assets/Plugins/WSA/x86/sqlite3.dll.meta
new file mode 100644
index 0000000..963467f
--- /dev/null
+++ b/Example/Assets/Plugins/WSA/x86/sqlite3.dll.meta
@@ -0,0 +1,126 @@
+fileFormatVersion: 2
+guid: a0bb909f5b8441e48a1632aef3d543a4
+timeCreated: 1507670500
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: X86
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Example_unity5/Assets/Plugins/x64.meta b/Example/Assets/Plugins/x64.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/x64.meta
rename to Example/Assets/Plugins/x64.meta
diff --git a/Example_unity4x/Assets/Plugins/iOS/x64/sqlite3.dll b/Example/Assets/Plugins/x64/sqlite3.dll
old mode 100644
new mode 100755
similarity index 100%
rename from Example_unity4x/Assets/Plugins/iOS/x64/sqlite3.dll
rename to Example/Assets/Plugins/x64/sqlite3.dll
diff --git a/Example/Assets/Plugins/x64/sqlite3.dll.meta b/Example/Assets/Plugins/x64/sqlite3.dll.meta
new file mode 100644
index 0000000..e30f156
--- /dev/null
+++ b/Example/Assets/Plugins/x64/sqlite3.dll.meta
@@ -0,0 +1,75 @@
+fileFormatVersion: 2
+guid: a3fee75616c5ab0449e841e6fc8a5172
+timeCreated: 1445131383
+licenseType: Free
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 1
+ settings:
+ CPU: None
+ Linux64:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ LinuxUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel:
+ enabled: 1
+ settings:
+ CPU: None
+ OSXIntel64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ SamsungTV:
+ enabled: 0
+ settings:
+ STV_MODEL: STANDARD_13
+ Win:
+ enabled: 1
+ settings:
+ CPU: None
+ Win64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ WindowsStoreApps:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ iOS:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Example_unity5/Assets/Plugins/x86.meta b/Example/Assets/Plugins/x86.meta
similarity index 100%
rename from Example_unity5/Assets/Plugins/x86.meta
rename to Example/Assets/Plugins/x86.meta
diff --git a/Example/Assets/Plugins/x86/sqlite3.dll b/Example/Assets/Plugins/x86/sqlite3.dll
new file mode 100755
index 0000000..d48a7ef
Binary files /dev/null and b/Example/Assets/Plugins/x86/sqlite3.dll differ
diff --git a/Example_unity5/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta b/Example/Assets/Plugins/x86/sqlite3.dll.meta
similarity index 76%
rename from Example_unity5/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta
rename to Example/Assets/Plugins/x86/sqlite3.dll.meta
index db7f4be..67dc6cd 100644
--- a/Example_unity5/Assets/Plugins/Android/libs/armeabi-v7a/libsqlite3.so.meta
+++ b/Example/Assets/Plugins/x86/sqlite3.dll.meta
@@ -1,5 +1,7 @@
fileFormatVersion: 2
-guid: a00620409803a41f598cabed0c2ecf9f
+guid: 34afd3dfc3051f3438965ecf7bd8c8df
+timeCreated: 1445131383
+licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
@@ -7,16 +9,16 @@ PluginImporter:
isPreloaded: 0
platformData:
Android:
- enabled: 1
+ enabled: 0
settings:
- CPU: ARMv7
+ CPU: AnyCPU
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
- CPU: AnyCPU
+ CPU: x86
DefaultValueInitialized: true
OS: AnyOS
Linux:
@@ -26,7 +28,11 @@ PluginImporter:
Linux64:
enabled: 0
settings:
- CPU: x86_64
+ CPU: None
+ LinuxUniversal:
+ enabled: 0
+ settings:
+ CPU: None
OSXIntel:
enabled: 0
settings:
@@ -34,17 +40,15 @@ PluginImporter:
OSXIntel64:
enabled: 0
settings:
- CPU: AnyCPU
- SamsungTV:
+ CPU: None
+ OSXUniversal:
enabled: 0
settings:
- STV_MODEL: STANDARD_13
- WP8:
+ CPU: None
+ SamsungTV:
enabled: 0
settings:
- CPU: AnyCPU
- DontProcess: False
- PlaceholderPath:
+ STV_MODEL: STANDARD_13
Win:
enabled: 0
settings:
@@ -52,7 +56,7 @@ PluginImporter:
Win64:
enabled: 0
settings:
- CPU: AnyCPU
+ CPU: None
WindowsStoreApps:
enabled: 0
settings:
@@ -60,6 +64,7 @@ PluginImporter:
DontProcess: False
PlaceholderPath:
SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
iOS:
enabled: 0
settings:
diff --git a/Example_unity5/Assets/Scenes.meta b/Example/Assets/Scenes.meta
similarity index 67%
rename from Example_unity5/Assets/Scenes.meta
rename to Example/Assets/Scenes.meta
index 003b019..df90c30 100644
--- a/Example_unity5/Assets/Scenes.meta
+++ b/Example/Assets/Scenes.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 3ad83ecfc4b5e2a4783139ed0e77b957
+guid: b8ab4eabea1d94b49808216caa3ed5d0
folderAsset: yes
-timeCreated: 1445131378
+timeCreated: 1453576960
licenseType: Free
DefaultImporter:
userData:
diff --git a/Example_unity5/Assets/Scenes/CreateDBFromScript.unity b/Example/Assets/Scenes/CreateDBFromScript.unity
similarity index 100%
rename from Example_unity5/Assets/Scenes/CreateDBFromScript.unity
rename to Example/Assets/Scenes/CreateDBFromScript.unity
diff --git a/Example_unity5/Assets/Scenes/CreateDBFromScript.unity.meta b/Example/Assets/Scenes/CreateDBFromScript.unity.meta
similarity index 100%
rename from Example_unity5/Assets/Scenes/CreateDBFromScript.unity.meta
rename to Example/Assets/Scenes/CreateDBFromScript.unity.meta
diff --git a/Example_unity5/Assets/Scenes/ExistingDBScript.unity b/Example/Assets/Scenes/ExistingDBScript.unity
similarity index 57%
rename from Example_unity5/Assets/Scenes/ExistingDBScript.unity
rename to Example/Assets/Scenes/ExistingDBScript.unity
index 1bc3bda..565fc47 100644
Binary files a/Example_unity5/Assets/Scenes/ExistingDBScript.unity and b/Example/Assets/Scenes/ExistingDBScript.unity differ
diff --git a/Example_unity5/Assets/Scenes/ExistingDBScript.unity.meta b/Example/Assets/Scenes/ExistingDBScript.unity.meta
similarity index 100%
rename from Example_unity5/Assets/Scenes/ExistingDBScript.unity.meta
rename to Example/Assets/Scenes/ExistingDBScript.unity.meta
diff --git a/Example_unity5/Assets/Scripts.meta b/Example/Assets/Scripts.meta
similarity index 67%
rename from Example_unity5/Assets/Scripts.meta
rename to Example/Assets/Scripts.meta
index 7812f69..314d30e 100644
--- a/Example_unity5/Assets/Scripts.meta
+++ b/Example/Assets/Scripts.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: 3679c41ee95457c4caa539f1340f715b
+guid: 817994a91ac197e42baaef83a9db4e19
folderAsset: yes
-timeCreated: 1445131378
+timeCreated: 1453576960
licenseType: Free
DefaultImporter:
userData:
diff --git a/Example_unity5/Assets/Scripts/CreateDBScript.cs b/Example/Assets/Scripts/CreateDBScript.cs
similarity index 100%
rename from Example_unity5/Assets/Scripts/CreateDBScript.cs
rename to Example/Assets/Scripts/CreateDBScript.cs
diff --git a/Example_unity5/Assets/Scripts/CreateDBScript.cs.meta b/Example/Assets/Scripts/CreateDBScript.cs.meta
similarity index 100%
rename from Example_unity5/Assets/Scripts/CreateDBScript.cs.meta
rename to Example/Assets/Scripts/CreateDBScript.cs.meta
diff --git a/Example_unity5/Assets/Scripts/DataService.cs b/Example/Assets/Scripts/DataService.cs
similarity index 81%
rename from Example_unity5/Assets/Scripts/DataService.cs
rename to Example/Assets/Scripts/DataService.cs
index c287dda..558ada1 100644
--- a/Example_unity5/Assets/Scripts/DataService.cs
+++ b/Example/Assets/Scripts/DataService.cs
@@ -39,9 +39,19 @@ public DataService(string DatabaseName){
File.Copy(loadDb, filepath);
#elif UNITY_WINRT
- var loadDb = Application.dataPath + "/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
- // then save to Application.persistentDataPath
- File.Copy(loadDb, filepath);
+ var loadDb = Application.dataPath + "/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
+ // then save to Application.persistentDataPath
+ File.Copy(loadDb, filepath);
+
+#elif UNITY_STANDALONE_OSX
+ var loadDb = Application.dataPath + "/Resources/Data/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
+ // then save to Application.persistentDataPath
+ File.Copy(loadDb, filepath);
+#else
+ var loadDb = Application.dataPath + "/StreamingAssets/" + DatabaseName; // this is the path to your StreamingAssets in iOS
+ // then save to Application.persistentDataPath
+ File.Copy(loadDb, filepath);
+
#endif
Debug.Log("Database written");
diff --git a/Example_unity5/Assets/Scripts/DataService.cs.meta b/Example/Assets/Scripts/DataService.cs.meta
similarity index 100%
rename from Example_unity5/Assets/Scripts/DataService.cs.meta
rename to Example/Assets/Scripts/DataService.cs.meta
diff --git a/Example_unity5/Assets/Scripts/ExistingDBScript.cs b/Example/Assets/Scripts/ExistingDBScript.cs
similarity index 100%
rename from Example_unity5/Assets/Scripts/ExistingDBScript.cs
rename to Example/Assets/Scripts/ExistingDBScript.cs
diff --git a/Example_unity5/Assets/Scripts/ExistingDBScript.cs.meta b/Example/Assets/Scripts/ExistingDBScript.cs.meta
similarity index 100%
rename from Example_unity5/Assets/Scripts/ExistingDBScript.cs.meta
rename to Example/Assets/Scripts/ExistingDBScript.cs.meta
diff --git a/Example_unity5/Assets/Scripts/Person.cs b/Example/Assets/Scripts/Person.cs
similarity index 100%
rename from Example_unity5/Assets/Scripts/Person.cs
rename to Example/Assets/Scripts/Person.cs
diff --git a/Example_unity5/Assets/Scripts/Person.cs.meta b/Example/Assets/Scripts/Person.cs.meta
similarity index 100%
rename from Example_unity5/Assets/Scripts/Person.cs.meta
rename to Example/Assets/Scripts/Person.cs.meta
diff --git a/SQLite4Unity3d/SQLite4Unity3d/SQLite.cs b/Example/Assets/Scripts/SQLite.cs
similarity index 87%
rename from SQLite4Unity3d/SQLite4Unity3d/SQLite.cs
rename to Example/Assets/Scripts/SQLite.cs
index 098d53e..18ce6c3 100644
--- a/SQLite4Unity3d/SQLite4Unity3d/SQLite.cs
+++ b/Example/Assets/Scripts/SQLite.cs
@@ -109,16 +109,16 @@ public enum SQLiteOpenFlags {
ProtectionNone = 0x00400000
}
- [Flags]
- public enum CreateFlags
- {
- None = 0,
- ImplicitPK = 1, // create a primary key for field called 'Id' (Orm.ImplicitPkName)
- ImplicitIndex = 2, // create an index for fields ending in 'Id' (Orm.ImplicitIndexSuffix)
- AllImplicit = 3, // do both above
+ [Flags]
+ public enum CreateFlags
+ {
+ None = 0,
+ ImplicitPK = 1, // create a primary key for field called 'Id' (Orm.ImplicitPkName)
+ ImplicitIndex = 2, // create an index for fields ending in 'Id' (Orm.ImplicitIndexSuffix)
+ AllImplicit = 3, // do both above
- AutoIncPK = 4 // force PK field to be auto inc
- }
+ AutoIncPK = 4 // force PK field to be auto inc
+ }
///
/// Represents an open connection to a SQLite database.
@@ -130,7 +130,7 @@ public partial class SQLiteConnection : IDisposable
private Dictionary _mappings = null;
private Dictionary _tables = null;
private System.Diagnostics.Stopwatch _sw;
- private long _elapsedMilliseconds = 0;
+ private TimeSpan _elapsed = default(TimeSpan);
private int _transactionDepth = 0;
private Random _rand = new Random ();
@@ -145,7 +145,7 @@ public partial class SQLiteConnection : IDisposable
// To prevent database disruption, a database file must be accessed *synchronously*.
// For the purpose we create synchronous objects for each database file and store in the
// static dictionary to share it among all connections.
- // The key of the dictionary is database file path and its value is an object to be used
+ // The key of the dictionary is database file path and its value is an object to be used
// by lock() statement.
//
// Use case:
@@ -155,11 +155,10 @@ public partial class SQLiteConnection : IDisposable
// - RunInDatabaseLock(Action) similarly locks the database but no transaction (for query)
private static Dictionary syncObjects = new Dictionary();
- public bool TimeExecution { get; set; }
-
#region debug tracing
public bool Trace { get; set; }
+ public bool TimeExecution { get; set; }
public delegate void TraceHandler (string message);
public event TraceHandler TraceEvent;
@@ -171,6 +170,16 @@ internal void InvokeTrace (string message)
}
}
+ public delegate void TimeExecutionHandler (TimeSpan executionTime, TimeSpan totalExecutionTime);
+ public event TimeExecutionHandler TimeExecutionEvent;
+
+ internal void InvokeTimeExecution(TimeSpan executionTime, TimeSpan totalExecutionTime)
+ {
+ if (TimeExecutionEvent != null) {
+ TimeExecutionEvent(executionTime, totalExecutionTime);
+ }
+ }
+
#endregion
public bool StoreDateTimeAsTicks { get; private set; }
@@ -219,7 +228,7 @@ public SQLiteConnection (string databasePath, SQLiteOpenFlags openFlags, bool st
Sqlite3DatabaseHandle handle;
#if SILVERLIGHT || USE_CSHARP_SQLITE
- var r = SQLite3.Open (databasePath, out handle, (int)openFlags, IntPtr.Zero);
+ var r = SQLite3.Open (databasePath, out handle, (int)openFlags, IntPtr.Zero);
#else
// open using the byte[]
// in the case where the path may include Unicode
@@ -260,14 +269,14 @@ void mayCreateSyncObject(string databasePath)
/// The sync object.
public object SyncObject { get { return syncObjects[DatabasePath];} }
- public void EnableLoadExtension(int onoff)
- {
- SQLite3.Result r = SQLite3.EnableLoadExtension(Handle, onoff);
+ public void EnableLoadExtension(int onoff)
+ {
+ SQLite3.Result r = SQLite3.EnableLoadExtension(Handle, onoff);
if (r != SQLite3.Result.OK) {
string msg = SQLite3.GetErrmsg (Handle);
throw SQLiteException.New (r, msg);
}
- }
+ }
static byte[] GetNullTerminatedUtf8 (string s)
{
@@ -315,14 +324,14 @@ public IEnumerable TableMappings {
///
/// The type whose mapping to the database is returned.
///
- ///
+ ///
/// Optional flags allowing implicit PK and indexes based on naming conventions
///
///
/// The mapping represents the schema of the columns of the database and contains
/// methods to set and get properties of objects.
///
- public TableMapping GetMapping(Type type, CreateFlags createFlags = CreateFlags.None)
+ public TableMapping GetMapping(Type type, CreateFlags createFlags = CreateFlags.None)
{
if (_mappings == null) {
_mappings = new Dictionary ();
@@ -394,11 +403,11 @@ public int CreateTable(CreateFlags createFlags = CreateFlags.None)
/// later access this schema by calling GetMapping.
///
/// Type to reflect to a database table.
- /// Optional flags allowing implicit PK and indexes based on naming conventions.
+ /// Optional flags allowing implicit PK and indexes based on naming conventions.
///
/// The number of entries added to the database schema.
///
- public int CreateTable(Type ty, CreateFlags createFlags = CreateFlags.None)
+ public int CreateTable(Type ty, CreateFlags createFlags = CreateFlags.None)
{
if (_tables == null) {
_tables = new Dictionary ();
@@ -466,85 +475,85 @@ public int CreateTable(Type ty, CreateFlags createFlags = CreateFlags.None)
return count;
}
- ///
- /// Creates an index for the specified table and columns.
- ///
- /// Name of the index to create
- /// Name of the database table
- /// An array of column names to index
- /// Whether the index should be unique
- public int CreateIndex(string indexName, string tableName, string[] columnNames, bool unique = false)
- {
- const string sqlFormat = "create {2} index if not exists \"{3}\" on \"{0}\"(\"{1}\")";
- var sql = String.Format(sqlFormat, tableName, string.Join ("\", \"", columnNames), unique ? "unique" : "", indexName);
- return Execute(sql);
- }
-
- ///
- /// Creates an index for the specified table and column.
- ///
- /// Name of the index to create
- /// Name of the database table
- /// Name of the column to index
- /// Whether the index should be unique
- public int CreateIndex(string indexName, string tableName, string columnName, bool unique = false)
- {
- return CreateIndex(indexName, tableName, new string[] { columnName }, unique);
- }
-
- ///
- /// Creates an index for the specified table and column.
- ///
- /// Name of the database table
- /// Name of the column to index
- /// Whether the index should be unique
- public int CreateIndex(string tableName, string columnName, bool unique = false)
- {
- return CreateIndex(tableName + "_" + columnName, tableName, columnName, unique);
- }
-
- ///
- /// Creates an index for the specified table and columns.
- ///
- /// Name of the database table
- /// An array of column names to index
- /// Whether the index should be unique
- public int CreateIndex(string tableName, string[] columnNames, bool unique = false)
- {
- return CreateIndex(tableName + "_" + string.Join ("_", columnNames), tableName, columnNames, unique);
- }
-
- ///
- /// Creates an index for the specified object property.
- /// e.g. CreateIndex(c => c.Name);
- ///
- /// Type to reflect to a database table.
- /// Property to index
- /// Whether the index should be unique
- public void CreateIndex(Expression> property, bool unique = false)
- {
- MemberExpression mx;
- if (property.Body.NodeType == ExpressionType.Convert)
- {
- mx = ((UnaryExpression)property.Body).Operand as MemberExpression;
- }
- else
- {
- mx= (property.Body as MemberExpression);
- }
- var propertyInfo = mx.Member as PropertyInfo;
- if (propertyInfo == null)
- {
- throw new ArgumentException("The lambda expression 'property' should point to a valid Property");
- }
-
- var propName = propertyInfo.Name;
-
- var map = GetMapping();
- var colName = map.FindColumnWithPropertyName(propName).Name;
-
- CreateIndex(map.TableName, colName, unique);
- }
+ ///
+ /// Creates an index for the specified table and columns.
+ ///
+ /// Name of the index to create
+ /// Name of the database table
+ /// An array of column names to index
+ /// Whether the index should be unique
+ public int CreateIndex(string indexName, string tableName, string[] columnNames, bool unique = false)
+ {
+ const string sqlFormat = "create {2} index if not exists \"{3}\" on \"{0}\"(\"{1}\")";
+ var sql = String.Format(sqlFormat, tableName, string.Join ("\", \"", columnNames), unique ? "unique" : "", indexName);
+ return Execute(sql);
+ }
+
+ ///
+ /// Creates an index for the specified table and column.
+ ///
+ /// Name of the index to create
+ /// Name of the database table
+ /// Name of the column to index
+ /// Whether the index should be unique
+ public int CreateIndex(string indexName, string tableName, string columnName, bool unique = false)
+ {
+ return CreateIndex(indexName, tableName, new string[] { columnName }, unique);
+ }
+
+ ///
+ /// Creates an index for the specified table and column.
+ ///
+ /// Name of the database table
+ /// Name of the column to index
+ /// Whether the index should be unique
+ public int CreateIndex(string tableName, string columnName, bool unique = false)
+ {
+ return CreateIndex(tableName + "_" + columnName, tableName, columnName, unique);
+ }
+
+ ///
+ /// Creates an index for the specified table and columns.
+ ///
+ /// Name of the database table
+ /// An array of column names to index
+ /// Whether the index should be unique
+ public int CreateIndex(string tableName, string[] columnNames, bool unique = false)
+ {
+ return CreateIndex(tableName + "_" + string.Join ("_", columnNames), tableName, columnNames, unique);
+ }
+
+ ///
+ /// Creates an index for the specified object property.
+ /// e.g. CreateIndex(c => c.Name);
+ ///
+ /// Type to reflect to a database table.
+ /// Property to index
+ /// Whether the index should be unique
+ public void CreateIndex(Expression> property, bool unique = false)
+ {
+ MemberExpression mx;
+ if (property.Body.NodeType == ExpressionType.Convert)
+ {
+ mx = ((UnaryExpression)property.Body).Operand as MemberExpression;
+ }
+ else
+ {
+ mx= (property.Body as MemberExpression);
+ }
+ var propertyInfo = mx.Member as PropertyInfo;
+ if (propertyInfo == null)
+ {
+ throw new ArgumentException("The lambda expression 'property' should point to a valid Property");
+ }
+
+ var propName = propertyInfo.Name;
+
+ var map = GetMapping();
+ var colName = map.FindColumnWithPropertyName(propName).Name;
+
+ CreateIndex(map.TableName, colName, unique);
+ }
public class ColumnInfo
{
@@ -666,8 +675,8 @@ public int Execute (string query, params object[] args)
if (TimeExecution) {
_sw.Stop ();
- _elapsedMilliseconds += _sw.ElapsedMilliseconds;
- Debug.WriteLine (string.Format ("Finished in {0} ms ({1:0.0} s total)", _sw.ElapsedMilliseconds, _elapsedMilliseconds / 1000.0));
+ _elapsed += _sw.Elapsed;
+ this.InvokeTimeExecution (_sw.Elapsed, _elapsed);
}
return r;
@@ -689,8 +698,8 @@ public T ExecuteScalar (string query, params object[] args)
if (TimeExecution) {
_sw.Stop ();
- _elapsedMilliseconds += _sw.ElapsedMilliseconds;
- Debug.WriteLine (string.Format ("Finished in {0} ms ({1:0.0} s total)", _sw.ElapsedMilliseconds, _elapsedMilliseconds / 1000.0));
+ _elapsed += _sw.Elapsed;
+ this.InvokeTimeExecution (_sw.Elapsed, _elapsed);
}
return r;
@@ -824,21 +833,21 @@ public IEnumerable