copy from github

This commit is contained in:
Sebastian Bularca
2026-03-27 15:14:08 +01:00
parent 4aefcfd47f
commit b5d13e86d9
63 changed files with 1706 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
{
"name": "Jovian.SaveSystem.Editor",
"rootNamespace": "Jovian.SaveSystem.Editor",
"references": [
"Jovian.SaveSystem"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bbc94d83b5c0e8c4c8c529cc64c94ddf
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,49 @@
using System.Collections.Generic;
using UnityEditor;
namespace Jovian.SaveSystem.Editor {
public sealed class SaveSystemSettingsProvider : SettingsProvider {
private SaveSystemSettings settings;
private SerializedObject serializedSettings;
private SaveSystemSettingsProvider(string path, SettingsScope scope)
: base(path, scope) { }
public override void OnActivate(string searchContext, UnityEngine.UIElements.VisualElement rootElement) {
settings = SaveSystemSettings.Load();
}
public override void OnGUI(string searchContext) {
EditorGUILayout.Space(10);
EditorGUILayout.LabelField("Save System Settings", EditorStyles.boldLabel);
EditorGUILayout.Space(5);
EditorGUI.BeginChangeCheck();
settings.saveFormat = (SaveFormat)EditorGUILayout.EnumPopup("Save Format", settings.saveFormat);
settings.maxAutoSavesPerSession = EditorGUILayout.IntSlider("Max Auto Saves Per Session", settings.maxAutoSavesPerSession, 1, 10);
settings.currentSaveVersion = EditorGUILayout.IntField("Current Save Version", settings.currentSaveVersion);
settings.saveDirectoryName = EditorGUILayout.TextField("Save Directory Name", settings.saveDirectoryName);
EditorGUILayout.Space(10);
EditorGUILayout.LabelField("Binary Obfuscation", EditorStyles.boldLabel);
settings.obfuscationKey = EditorGUILayout.TextField("Obfuscation Key", settings.obfuscationKey);
if(settings.saveFormat == SaveFormat.Json) {
EditorGUILayout.HelpBox("JSON format is human-readable and suitable for development. Switch to Binary for release builds.", MessageType.Info);
}
if(EditorGUI.EndChangeCheck()) {
settings.Save();
}
}
[SettingsProvider]
public static SettingsProvider CreateProvider() {
SaveSystemSettingsProvider provider = new SaveSystemSettingsProvider("Project/Jovian/Save System", SettingsScope.Project) {
keywords = new HashSet<string>(new[] { "save", "persistence", "serialization", "binary", "json" })
};
return provider;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 34f9753365e282e4f8c610df1cc61e28