Forum rules - please read before posting.

Custom save label not stored

Hi,

I'm trying to create new saves using custom labels, but I noticed that the label is always saved as "Save_X".

Debugging I found that the SavefileHandlers each time GetSaveFile is called they override the label

string label = (isImport ? SaveSystem.ImportLabel : SaveSystem.SaveLabel) + " " + saveID.ToString ();
return new SaveFile (saveID, profileID, label, fullFilename, screenShot, screenshotFilename, updateTime);

if label string is always set using this two properties than setting a custom label is useless

Comments

  • If you open up the Save File Manager, via the top of the Settings Manager, do the labels appear correctly there?

    What are your AC/Unity versions, and can you share screenshots of the Action(s) involved? I will attempt a recreation.

  • As you can see the Save File Manager doesn't save the label

  • we're using unity 6.0.32 and AC 1.82.4

  • I solved adding two lines into OnCompleteSaveOperation inside SaveSystem.cs and moving UpdateSaveFileLabels before Options.UpdateSaveLabels

    public void OnCompleteSaveOperation (SaveFile saveFile, bool wasSuccesful, SaveOperation saveOperation, System.Action onComplete)
    {
        Destroy (saveOperation);
    
        if (!wasSuccesful)
        {
            return;
        }
        string label = saveFile.label; //added
        saveFile = SaveFileHandler.GetSaveFile (saveFile.saveID, Options.GetActiveProfileID ()); // Get screenshot
        saveFile.label = label; //added
        UpdateSaveList (saveFile);
    
        UpdateSaveFileLabels (ref foundSaveFiles); //swapped
    
        // Update PlayerPrefs
        Options.UpdateSaveLabels (foundSaveFiles.ToArray ()); //swapped
    
    
        onComplete?.Invoke ();
        KickStarter.eventManager.Call_OnSave (FileAccessState.After, saveFile.saveID, saveFile);
    }
    
  • Thank you, I will look into this.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.