From 0c36de0c7eeb021a0a8e2d9405e9cbd57b10b4d3 Mon Sep 17 00:00:00 2001 From: Jon Manning Date: Wed, 15 Nov 2023 11:08:20 +1100 Subject: [PATCH] Update parameter name and comments for save/load methods --- Runtime/DialogueRunner.cs | 45 ++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/Runtime/DialogueRunner.cs b/Runtime/DialogueRunner.cs index d5137d9e..a14457bf 100644 --- a/Runtime/DialogueRunner.cs +++ b/Runtime/DialogueRunner.cs @@ -1391,21 +1391,28 @@ public bool LoadStateFromPlayerPrefs(string SaveKey = "YarnBasicSave") } /// - /// Loads all variables from the requested file in persistent storage into the Dialogue Runner's variable storage. + /// Loads all variables from the requested file in persistent storage + /// into the Dialogue Runner's variable storage. /// /// /// - /// This method loads the file from the persistent data storage and attempts to read it as JSON. This is then deserialised and loaded into the . + /// This method loads the file from the + /// persistent data storage and attempts to read it as JSON. This is + /// then deserialised and loaded into the . /// /// - /// The loaded information can be stored via the method. + /// The loaded information can be stored via the method. /// /// - /// the name the save file should have on disc, including any file extension - /// if the variables were successfully loaded from the player preferences; otherwise. - public bool LoadStateFromPersistentStorage(string SaveFile) + /// the name the save file should have on + /// disc, including any file extension + /// if the variables were successfully + /// loaded from the player preferences; + /// otherwise. + public bool LoadStateFromPersistentStorage(string saveFileName) { - var path = System.IO.Path.Combine(Application.persistentDataPath, SaveFile); + var path = System.IO.Path.Combine(Application.persistentDataPath, saveFileName); try { @@ -1450,23 +1457,31 @@ public void SaveStateToPlayerPrefs(string SaveKey = "YarnBasicSave") } /// - /// Saves all variables from variable storage into the persistent storage. + /// Saves all variables from variable storage into the persistent + /// storage. /// /// /// - /// This method attempts to writes the contents of as a JSON file and saves it to the persistent data storage under the file name . - /// The saved information can be loaded via the method. + /// This method attempts to writes the contents of as a JSON file and saves it to the + /// persistent data storage under the file name . The saved information can be loaded via the + /// method. /// /// - /// If already exists it will be overwritten, not appended. + /// If already exists, it will be + /// overwritten, not appended. /// /// - /// the name the save file should have on disc, including any file extension - /// if the variables were successfully written into the player preferences; otherwise. - public bool SaveStateToPersistentStorage(string SaveFile) + /// the name the save file should have on + /// disc, including any file extension + /// if the variables were successfully + /// written into the player preferences; + /// otherwise. + public bool SaveStateToPersistentStorage(string saveFileName) { var data = SerializeAllVariablesToJSON(); - var path = System.IO.Path.Combine(Application.persistentDataPath, SaveFile); + var path = System.IO.Path.Combine(Application.persistentDataPath, saveFileName); try {