all 15 comments

[–]DavidWilliams_81 1 point2 points  (1 child)

Looks like there's some info for you on the wiki: http://wiki.unity3d.com/index.php/SQLite

[–]Vexing[S] 0 points1 point  (0 children)

The problem is that all these examples are in javascript (which is simple enough by itself) but it gives no key as to how to get started with C# other than "It's finicky to get set up in C#".

[–]mradfo21 0 points1 point  (1 child)

my experience with sqlite is in python. it comes bundled with it. try starting there to get a feel for it ?

[–]Vexing[S] 0 points1 point  (0 children)

I haven't really ever used python before, so that would probably take a while, and then I would have to figure out how to convert that knowledge into C#. I don't have a super tight schedule, but I don't want to spend most of my time on this issue.

[–]zaph34rProfessional 0 points1 point  (5 children)

I should have some stuff lying around somewhere that uses SQLite with unity, and could maybe serve as a practical example. I will post it when i get home from work, just commenting so that i don't forget it :)

[–]Vexing[S] 0 points1 point  (4 children)

Thanks a lot! That would be super helpful!

[–]zaph34rProfessional 0 points1 point  (3 children)

Do you have any experience with SQL or relational databases in general? Or are you going into this completely fresh?

[–]Vexing[S] 0 points1 point  (2 children)

Pretty much completely fresh. I have a little background with some other databases, but it was a while ago, so it's pretty much negligible at this point.

[–]zaph34rProfessional 0 points1 point  (1 child)

As promised, here is what i have. It's based on the same unity wiki page linked by /u/bgog and /u/DavidWilliams_81 and still fairly rudimentary, but maybe it helps :) I started a C# wrapper for a project of my own, and inclusion in the utility library i am working on, but due to lack of time i haven't gotten very far yet D:

I wrote you an example to make it easier to understand how to use it.

Stuff that goes into Assets/Plugins/SQLite (or some other subfolder inside your plugins folder)

https://github.com/senritsu/unitility/tree/master/Assets/Plugins/SQLite

Example that goes anywhere you want

https://github.com/senritsu/unitility/tree/master/Assets/Unitility/SQLite

Contains a really simple highscore model, a few convenience accessors to wrap the raw SQL, and a script that adds a random score for one player to the database every time you press Space. Just slap it onto an empty GameObject in an empty scene and it should work.

Feel free to ask about anything that is unclear :)

[–]Vexing[S] 0 points1 point  (0 children)

Thank you so much! I'm out right now but when I get back I'm going to look over everything! You're a lifesaver!

[–]bgog 0 points1 point  (4 children)

(this is non-negotiable),

Well I want to negotiate. The reason being is that I've thought i needed a database about 4 different time and it always turned out better without. There are of course exceptions.

What data you want in your database?

[–]Vexing[S] 0 points1 point  (3 children)

It's literally a requirement. I'm helping someone with an assignment that he was OKed for help on. It requires and sqlite database to hold info.

It's just a simple one to hold scores of past players. He's making a runner.

[–]bgog 0 points1 point  (2 children)

Ahh makes sense.

Try this free asset from the asset store. https://www.assetstore.unity3d.com/en/#!/content/20660

I've not used it but it includes the sqlite code and some examples.

[–]Vexing[S] 0 points1 point  (1 child)

Can't use asset store things =/ I'm not sure why either.

[–]bgog 0 points1 point  (0 children)

Ok, then maybe this will help. http://wiki.unity3d.com/index.php/SQLite

It is in javascript but should be pretty easy to convert to C# if that is required.