I’m currently making a sports management game and am storing my data in gameobjects. now that I have over 100 players and therefor 100 gameobjects its getting very messy in my hierarchy. Then when I add each game played to a gameobject I’m getting a ridiculous amount of gameobjects.
Is there any other ways of storing the data more efficiently without SQL as android doesn’t let me use it? and could you point me to a tutorial on the subject if possible so I can learn more? Almost everything I can find is for saving a game not looking up data for transfers etc.
- hold accessible data on disk (stay
always after game close) : use
[playerPrefs] or any other method
of [serialisation] for example
2. hold accessible data on RAM
(gone when you close game): use
you may check also : [scriptable-objects]
U can use ScriptableObjects! it’s simple and easy! u can create a List in it! and that’s it! it’s easier than XML/JSON and u can use for session saved data or persistent ones as well! with less memory allocation or size on disk! and accept all of unity classes like vector3/vector4! and even can contain functions in it!
You should certainly not have gameobjects in your hierarchy that are just storing data - that’s what scriptableobjects are for, which Unity can serialise natively.
Alternatively, if you have a lot of tabular data, and need to describe relationships between records, SQL might be the way to go (it works fine on Android). Or XML/CSV/JSON if you have slightly more modest data requirements.