aenah
New Member
Posts: 6
|
Post by aenah on Mar 23, 2019 19:17:18 GMT
Hi, everyone.
I need some help.
I am using SimpleSQL for save my player`s data. My game takes place over several days, so, each night (in the game time), when the hour:minute is 23:59, the game saves and a new day starts.
For this, I want to copy my database in that moment. When player leaves the game and come back to play, I load de saved database. I want to have one database for each day in the game. So, the player can back to the day he wants (like a time machine).
My problem is that, when I copy the database (day1.bytes), this copy does not have the changes made in it (INSERTS and UPDATES) while the player was playing. ¿Why?
I am using this for copy the database:
AssetDatabase.CopyAsset( "Assets/Resources/BDFiles/base.bytes", "Assets/Resources/BDFiles/day1.bytes");
Later, when the user load the game, I use the next code:
TextAsset bd = Resources.Load( "BDFiles/day1" ) as TextAsset;
dm.GetComponentInParent<SimpleSQL.SimpleSQLManager>().databaseFile = bd;
dm.GetComponentInParent<SimpleSQL.SimpleSQLManager>().Initialize(true); The copy database is virgin, no has changes over it.
Can someone help me?
Thanks!
|
|
|
Post by echo17 on Mar 24, 2019 18:31:14 GMT
|
|