Class serialization vs sqlite database

I am making a 2D top down RPG with the new{ish) 2D support offered by Unity. I need a way of storing information such as abilities (for enemies and player), items, ability effects (buffs/debuffs), enemy types etc etc.

My question is would it be better to serialize classes and store them as assets in the assets folder as a .asset file or create a sqlite database and store the information there. The amount of information that may ultimately need to be store could be a lot.

If the data is all static (i.e. created at edit time) then an asset/ScriptableObject is the way to go. You’ll get all of the benefit of Unity’s loading optimizations, resource dependency tracking, inspector UIs, etc.

If you need to serialize data at run time, I think XML is a good option. .NET makes it easy to write to and from XML with very little code and no external libraries. JSON can work well, too, but it’s not really any better than XML unless you are interfacing with external libraries on a web server.

In general I wouldn’t recommend using SQL of any sort for the data in a game client. Proper databases have some big advantages when you are building large scale networked applications, where you need to worry about scalability and redundancy and all that, but for the data in a game client it’s just overkill. Even if you have a lot of data, it’s probably only a few MB of text, which will be a fraction of the memory you spend on textures alone.