Code Monkey home page Code Monkey logo

sqlite4unity3d's Introduction

Average time to resolve an issue Percentage of issues still open

What's this?

When I started with Unity3d development I needed to use SQLite in my project and it was very hard to me to find a place with simple instructions on how to make it work. All I got were links to paid solutions on the Unity3d's Assets Store and a lot of different and complicated tutorials.

At the end, I decided that there should be a simpler way and I created SQLite4Unity3d, a library that helps you to use SQLite in your Unity3d projects in a clear and easy way and works in iOS, Android and Windows Phone projects.

Besides that, it uses the great sqlite-net library as a base so you will have Linq besides sql. For a further reference on what possibilities you have available with this library I encourage you to visit its github repository.

*Note: SQLite4Unity3d uses only the synchronous part of sqlite-net, so all the calls to the database are synchronous.

If you want to know more about why I created this plugin you can read more here.

The fast track

All you have to do to start using it in your project:

  1. Download this zip and copy the resulting folder to your Assets/Plugins folder. It contains the dlls that Unity3d will need to access sqlite.
  2. Don’t forget to copy your SQLite database file in your Assets/StreamingAssets folder if you’re shipping one.
  3. You’re done! Now you can get access to your database using sqlite-net. ;P

Example

If you want to try it I've uploaded a small example that you will be able to find in the "Example" folder. Download the folder and open it with Unity3d to give it a try. You will notice that I've placed a specific example for Unity 4.x and Unity 5.

iOS particularities

As you may know iOS doesn't allow JIT compilation so, generally speaking, you will have to be very careful when you use reflection in your code. For a more deeper explanation of this issue please refer to Google but making it short: you cannot create dynamic objects using reflection. How is this affecting SQLite4Unity3d? Well, prior to this version you couldn't use very complicated queries. Now, for basic queries you will have iOS support. In case you stumble uppon a JIT compilation error it's time to use the old sql syntax.

Plugins in several platforms

In general you won't find any issues with Android and iOS. When you start deploying your WP version, please take a look at the readme files inside the plugins folder. They will help you make it work without problems.

Acknowledgements

This project is based on the work of:

sqlite4unity3d's People

Contributors

robertohuertasm avatar pokehanai avatar oruban avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.