Search found 9 matches

by Levgre
Sun Mar 07, 2021 6:38 pm
Forum: General Discussion
Topic: Can you reduce the key string length for a saved object to reduce save file size?
Replies: 3
Views: 1074

Re: Can you reduce the key string length for a saved object to reduce save file size?

Thanks for the help! I do use compression but unfortunately the saving process still causes lag delay in my game of about .5-1 seconds (I have it on autosave every 10 seconds). Right now my uncompressed file size is about 7-8 MB so I thought cutting that down could minimize the delay.
by Levgre
Sun Mar 07, 2021 5:08 am
Forum: General Discussion
Topic: Can you reduce the key string length for a saved object to reduce save file size?
Replies: 3
Views: 1074

Can you reduce the key string length for a saved object to reduce save file size?

i.e the following line writer.WriteProperty("CrewLoyalty", instance.Loyalty, ES3Type_float.Instance); Could I change "CrewLoyalty" to for example "Loy"? Will that reduce file size? Also, why doesn't the string "CrewLoyalty" update after I changed the name of t...
by Levgre
Mon Nov 16, 2020 10:47 pm
Forum: General Discussion
Topic: Loading compressed save file doesn't work
Replies: 3
Views: 972

Re: Loading compressed save file doesn't work

I seem to have "fixed" it, by doing compression in the code rather than changing it in the ES3 settings window. This was my old code (compression turned on in settings) public void SaveGame() { ES3.Save<PlayerSave>("PlayerSaveScript", PlayerSaveScript); NewGame = false; } public ...
by Levgre
Mon Nov 16, 2020 9:36 pm
Forum: General Discussion
Topic: Loading compressed save file doesn't work
Replies: 3
Views: 972

Loading compressed save file doesn't work

Everything was working and loading fine, then I tried to switch to compress mode and now the saved content is null. Do I need to decompress the save file somehow (don't see a way to, I'm just using ES3.LoadInto), or change something else in settings (such as format, encryption, etc.)? Thanks for any...
by Levgre
Tue Aug 18, 2020 6:14 pm
Forum: General Discussion
Topic: Saved lists not functioning correctly
Replies: 8
Views: 2098

Re: Saved lists not functioning correctly

Hi there, Just to check, have you used Debug.Log to check that the items in the CrewLists List are correct? Also be aware that the items in the array will be saved by reference rather than by value. Also note that only the CrewLists list is being saved. The other lists are not being saved. All the ...
by Levgre
Tue Aug 18, 2020 5:33 pm
Forum: General Discussion
Topic: Saved lists not functioning correctly
Replies: 8
Views: 2098

Re: Saved lists not functioning correctly

Here's the full code for the Ship ES3 type (Ship class contains the Crew Lists) using System; using UnityEngine; namespace ES3Types { [UnityEngine.Scripting.Preserve] [ES3PropertiesAttribute("CrewLists", "ShipInventoryInt", "ShipInventory", "BelowDeckInventory"...
by Levgre
Mon Aug 17, 2020 8:15 pm
Forum: General Discussion
Topic: Saved lists not functioning correctly
Replies: 8
Views: 2098

Re: Saved lists not functioning correctly

I just left in the relevant variables since it is pretty cluttered, hopefully this highlights what I'm doing wrong/gives some direction. public class Player : MonoBehaviour { public void SaveGame() { ES3.Save<PlayerSave>("PlayerSaveScript", PlayerSaveScript); } public void LoadGame() { Pla...
by Levgre
Mon Aug 17, 2020 7:21 pm
Forum: General Discussion
Topic: Saved lists not functioning correctly
Replies: 8
Views: 2098

Saved lists not functioning correctly

So I have objects saved in multiple lists for organizational purposes, for "Crew" objects (it's a ship sailing game). The structure is: ListA = List<Crew> Crew1, crew2, crew3 ListB = List<Crew> Crew4, crew5, crew6 ListC = List<Crew> Crew7, crew8, crew9 ListD = List<List<Crew>> ListA, ListB...
by Levgre
Mon Apr 27, 2020 10:49 pm
Forum: General Discussion
Topic: Loaded class losing variables when passed as a parameter
Replies: 1
Views: 1168

Loaded class losing variables when passed as a parameter

I have a class that only has basic variables such as float, string, and bool. When I pass the class as a parameter for a function some of those float values become 0 when they had just been changed. When I debug the class's values by a direct reference, the values appear as non-zeroes as they should...