SaveFile.es3 just getting larger and larger

Discussion and help for Easy Save 3
Post Reply
frikic
Posts: 8
Joined: Thu Nov 06, 2014 9:36 am

SaveFile.es3 just getting larger and larger

Post by frikic »

I have issues with because its getting larger every time data is overwritten,
data that is actually being changed is fine and its at the top of the file all the time:

Code: Select all

"ScenePositions" : {
		"__type" : "UnityEngine.Vector3[],UnityEngine.CoreModule",
		"value" : [
			{
				"x" : 114.635986,
				"y" : -0.69,
				"z" : 0
			},{
				"x" : 132.156,
				"y" : -0.69,
				"z" : 0
			},{
               ETC....
But data that is not being changed gets more
empty space between it and closing bracket (})
it will have empty space like this, and will increase it over time:

Code: Select all

"PoppyHouse_isHouseOpen" : {
		"__type" : "System.Boolean",
		"value" : true



--> empty space


}
Im saving layer positions, and looking for the time that camera stops moving (in LateUpdate())

Code: Select all

if (hasCameraMoved)
	    	{
		    	hasCameraMoved = false;
		    	ES3.Save<Vector3>("CameraSavedPosition", Camera.main.transform.position);
		    	
			#if UNITY_EDITOR
		    	Debug.Log("[EDITOR] Saving camera and paralax layers positions");
			#endif
		    	
		    	for (int i = 0; i < skyParts.Length; i++)
		    	{
		    		savedSkyPositions[i] = skyParts[i].localPosition;
		    	}
		    	ES3.Save<Vector3[]>("SkyLayersPositions", savedSkyPositions);
		    	ES3.Save<List<int>>("SkyLayerOrder", skyLayerOrder);
		    	
		    	for (int i = 0; i < middlegroundParts.Length; i++)
		    	{
		    		savedMiddlegroundPositions[i] = middlegroundParts[i].localPosition;
		    	}
		    	ES3.Save<Vector3[]>("MiddlegroundPositions", savedMiddlegroundPositions);
		    	ES3.Save<List<int>>("MiddlegroundLayerOrder", middlegroundLayerOrder);
		    	
		    	for (int i = 0; i < sceneParts.Count; i++)
		    	{
		    		savedScenePositions[i] = sceneParts[i].localPosition;
		    	}
		    	ES3.Save<Vector3[]>("ScenePositions", savedScenePositions);
		    	ES3.Save<List<int>>("SceneLayerOrder", sceneLayerOrder);
	    	}
	    	return;
	    }
Can i resolve this by removing empty space somehow?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: SaveFile.es3 just getting larger and larger

Post by Joel »

Hi there,

Thanks for the detail, I've managed to replicate this and it will be resolved in the next update. In the meantime you can disable 'Pretty Print JSON' in Window > Easy Save 3 > Settings, or if you private message me your invoice number I can send the update over.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
frikic
Posts: 8
Joined: Thu Nov 06, 2014 9:36 am

Re: SaveFile.es3 just getting larger and larger

Post by frikic »

Ok no need I will just use older version, that don't have this feature for now, thanks ;)
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: SaveFile.es3 just getting larger and larger

Post by Joel »

If you don't want to use the feature you can just uncheck 'Pretty Print JSON' in Window > Easy Save 3 > Settings.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
frikic
Posts: 8
Joined: Thu Nov 06, 2014 9:36 am

Re: SaveFile.es3 just getting larger and larger

Post by frikic »

Ok thanks ;)
BISLY
Posts: 5
Joined: Wed Oct 16, 2019 10:06 am

Re: SaveFile.es3 just getting larger and larger

Post by BISLY »

Hey,
Im kinda having the same issue. im making an app which is essentially a data organizer. I have a list of food recipes and their properties, same for the ingredients which each recipe contains, amount, price etc... im now standing on about 150 keys, each of them saves local FSMs with about 5-8 variables- floats, strings, short arrays- nothing fancy. My es3 file size is now 800kb. I wonder if i can reduce it or i have to take another approach using .csv files to save all my data..?? I tried unchecking
'Pretty Print JSON', didnt reduce the file size much...

waiting to hear from you,
bisly
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: SaveFile.es3 just getting larger and larger

Post by Joel »

Hi there,

This thread is to do with the length of the file in a text editor getting larger, rather than the file size on disk, so unchecking Pretty Print JSON won't help in this situation.

If you want to reduce file size on disk you can enable compression in the settings.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply