I’m trying to understand the server side high score tutorial found on the wiki but I’m not having much joy.
My intention is to save load a few variable from a database.
Is there any code somewhere which (function1)-just posts one variable to a server and (function2)receives that variable?
Once I have that basic knowledge the rest should be easy (er).
The high score tutorial seems to do fancy things like display the top 5 scores etc and its really not what I need…(just adds to the confusion as I know very little PHP)
Independent of the fancy things it does, the technique itself of using the WWW class to update and select rows from a database is exactly what you are looking for.
Okay cool cheers, I’ve managed to get it working but looking at some of the code, if I want to store say 1000 variables then the following line is going to be pretty long…is that right? It doesnt even fit on this page with just 3 variables…??
Can I save arrays to the database…or even better - player prefs files? Is there a better, nicer way?
Could I save assetbundles containing the save data separatly and have them called from unity? My database would just contain user names and passwords pointing to the correct asset bundle. Is this a logical proven method ?
I think the question is - what is the best method to save game data to a server?