tutorial Unity3d and SQLite database Part 1

tutorial  Unity3d and SQLite database Part 1

To create SQLlite database in unity 5.6.x and 2017 Create New project in unity 3d Create Folder plugins Open SQLlite admin software to create Database Table Create New database and save on folder plugin in your project in unity 3d Create your Table Table Name add your table fields such as (ID, name , Email , Address ) Add data in folder Create anther folder Script Create new C# file db.cs Must be using using Mono.Data.Sqlite; ,
using System.Data; and
using System; To Unity support Sq Lite and data add reference System.Data.dll and Mono.Data.Sqlite.dll get this file C:Program FilesUnityEditorDataMonolibmono2.0 Copy and past code database connection and edit your database name and location Enter you Table name Enter Your fields Debug.Log Crate game object Add db.cs to game object and see 2 error messages To solve dll errors in unity must be add 2 files dll (mono.data.sqlite and system.data ) to your project on assets folder To compile project on unity on windows must be add sqlite3.def you must be know your windows (32bit or 64bit) to add this file Copy past this file in your project in Plugins run your application


  1. Hello. thanks for the detailled explanations.
    it works in my editor on PC but does not work when building on android.
    the connexion to SQLite does not seem to occur.
    Any ideas to help me friend ?

  2. @Wonder Developer

    Hey mate , can i ask u something cause i m really confused?
    If i have a database written in SQLiteStudio for example , can i use it in a C# game in Unity , and how ?

    thanks a lot

  3. Hi! 🙂 Sorry if my questions may seem unkind, but … Before I start your tutorial … is this for remote or local sqlLite connections? And …. May I follow It even if I am using MacOs? Thanks! 🙂

  4. Is there a non dll plugin to enable .s3db in unity? I whant to deploy to UWP an dI fear it will not pass the certification

  5. ทำได้แล้ว ขอบคุณนะ สอนละเอียดมาก Thank <3

  6. You know at first I was quite puzzled about the choice of audio background for this video, but after spending few hours with this functionality I understood it was 100% correct.

  7. got the error
    SqliteException: Unable to open the database file
    Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool)
    Mono.Data.Sqlite.SqliteConnection.Open ()

  8. hello, i followed the steps as in the video but i faced a problem when i added the System.Data.dll and the Mono. The error message says

    Microsoft (R) Visual C# Compiler version (9d34608e)
    Copyright (C) Microsoft Corporation. All rights reserved.

    error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:UsersteetoDesktopSQLITE PROJECTAssetsSystem.Data.dll' and 'C:Program FilesUnityEditorDataNetStandardcompat2.0.0shimsnetfxSystem.Data.dll'. Remove one of the duplicate references.

    the version of my visual studio is 2017, and unity 2018.3.2 it's ok ?

  9. Will this work on Android after building or do I need to add some config or codes to make it work? please need your help

Leave a Reply

Your email address will not be published. Required fields are marked *