SQLite Forum

SQLite data access for Unity Game Engine

SQLite data access for Unity Game Engine

(1) By Jon (Gamer71) on 2021-05-28 08:46:03 [link] [source]

I am creating a game using Unity game engine. I would like to use SQLite. How do I manage the data in SQLite? Are class wrappers used or should I use C# LINQ or is there something else I should use.



(2) By Simon Slavin (slavin) on 2021-05-28 13:54:49 in reply to 1 [source]

Include the amalgamation .c and .h files in your project. Make sure that your toolchain understands that '.c' files are C, not C++.

Call the functions in the C file the same way you'd call any other functions from Unity. This depends which scripting language you're using in Unity, but if I recall correctly you use extern or #include as appropriate, then make the calls passing appropriate parameters. One consideration is parsing the results returned by, for example, a SELECT query.

Bleh. In checking out the above I did some web searches and found good advice. Perhaps do a web search on 'unity sqlite x' where 'x' is whatever unity scripting language you're using.

(3) By Jon (Gamer71) on 2021-05-31 02:29:17 in reply to 2 [link] [source]

Thanks for the info.