feat: update Godot integration and coordinated package dependencies
Publish UPM package / publish (push) Successful in 2s
Publish NuGet packages / publish (push) Successful in 4m2s

This commit is contained in:
cneicy committed 2026-11-06 19:13:16 +08:00
1 parent cdb682f484
commit 67d6814c4b
11 files changed
+525 -49

No files matched your search

+22 -2
View File
@@ -33,8 +33,28 @@ namespace ShrinkDataSaver
if (string.IsNullOrWhiteSpace(rootPath))
throw new InvalidOperationException("ShrinkDataSaver platform paths are not configured.");
var storage = new LocalStorageProvider(rootPath);
ShrinkSettings.Initialize(storage, System.IO.Path.Combine(rootPath, settingsFileName));
ShrinkSave.Initialize(storage, System.IO.Path.Combine(rootPath, "saves"), saveFileExtension, currentSaveVersion);
Initialize(storage, rootPath, saveFileExtension, settingsFileName, currentSaveVersion);
}
public static void Initialize(IStorageProvider storage, string? rootPath = null,
string saveFileExtension = ".json", string settingsFileName = "settings.json",
int currentSaveVersion = 1)
{
if (storage == null)
throw new ArgumentNullException(nameof(storage));
rootPath ??= Paths?.PersistentDataPath;
#if UNITY_5_3_OR_NEWER
rootPath ??= UnityEngine.Application.persistentDataPath;
#endif
var settingsPath = string.IsNullOrWhiteSpace(rootPath)
? settingsFileName
: System.IO.Path.Combine(rootPath, settingsFileName);
var savesDir = string.IsNullOrWhiteSpace(rootPath)
? "saves"
: System.IO.Path.Combine(rootPath, "saves");
ShrinkSettings.Initialize(storage, settingsPath);
ShrinkSave.Initialize(storage, savesDir, saveFileExtension, currentSaveVersion);
}
internal static double TimeSeconds