Pro Reset Game
Loading...
Searching...
No Matches
Pro Reset Game

Pro Reset Game — SaveManager Universal Save System Documentation v2.0.0

About SaveManager

SaveManager is the core component of Pro Reset Game, a reflection-driven, plug-and-play save system for Unity 2021.3 LTS and later. It captures, encrypts (optional AES-256) and restores any Unity-serialisable data—including custom structs and third-party components—without additional code.

Key Capabilities • Explicit Save Entries – point-and-click selection of individual fields & properties. • [Saveable] Attributes – add one line to mark data for persistence. • Full-field Dump – serialise every Unity-serialisable member on chosen objects. • Slot System – fixed or unlimited slots with automatic filename patterns. • AES-256 Encryption – single-toggle, at-rest file encryption.

Quick-Start

  1. Install – import Pro Reset Game through the Package Manager or drag the folder into Assets.
  2. Add the component – pick an object in your bootstrap scene and attach SaveManager.
  3. Choose a saving method in the custom inspector: • Use Explicit Save Entries • Use [Saveable] Attributes • Save All Serializable Fields
  4. Press Play and use the Save Game / Load Game buttons in the inspector to validate the setup.

Production Usage – call RecordState() and LoadState() from code (e.g. main-menu buttons, checkpoints, scene loaders).

Technical Details

Requirements • Unity 2021.3 LTS or later • .NET Standard 2.1 API level • No third-party dependencies (AES uses System.Security.Cryptography)

Known Limitations • Saving static fields and non-serialisable types (e.g. open file handles) is not supported. • Reflection-based full-field dumps are heavier on large scenes—prefer explicit entries in performance-critical titles.

Package Content (core files)

FilePurpose
PropertyListConfig.csScriptableObject whitelist / blacklist of component properties
PropertyListConfigEditor.csEditor UI for PropertyListConfig
SaveManager.csRuntime manager that captures / restores game state
SaveManagerEditor.csCustom inspector and editor tooling
SaveableAttribute.csAttributes: Saveable, SaveableIgnore, SaveableDefaultReset
SerlizableType.csWrapper enabling Unity-friendly System.Type serialisation
SerlizableTypeDrawer.csProperty drawer for SerializableType
SerlizationWrapper.csUtility for dictionary⇄JSON conversion

API Reference

ScopeReturnMethodParametersDescription
publicvoidRecordStateCapture the current game state and write it to disk using active settings.
publicvoidLoadStateLoad the most recent save file (or slot) and restore values.
publicvoidSave_SaveFileToDiskint saveSlotSlot-aware variant of RecordState.
publicvoidLoad_SaveFileFromDiskint saveSlotSlot-aware variant of LoadState.
publicList<string>GetAllSaveFileIDsReturn a list of every detected slot index or timestamp.
publicboolDeleteSaveFilestring idDelete a specific save file. Returns true on success.
publicvoidDumpSavedDataToConsoleDebug helper — prints the cached data structure.

Public Variables (SaveManager)

ScopeTypeNameDescription
publicboolSaveAllSerializableFieldsWhen true, serialise every Unity-serialisable field found by reflection.
publicboolSaveEverySingleComponentOrComponentInListTraverse whole scene or limit to ComponentListToSaveEveryThing.
publicList<Component>ComponentListToSaveEveryThingWhitelist used when the previous flag is false.
publicboolIncludeBuiltinComponentPropertiesInclude built-in properties (e.g., Rigidbody.mass) in full-field dumps.
publicComponenttargetComponentInspector helper — ignored at runtime.
publicstringvariableNameInspector helper displaying the selected member.
publicbooluseSaveEntriesToggle Explicit Save Entries.
publicList<SaveEntry>saveEntriesStores per-variable rules.
publicbooluseSaveableAttributesToggle automatic attribute scanning.
publicboolSaveEverySingleAttributeComponentOrComponentInListRestrict attribute scan to serializableFieldComponents if false.
publicList<MonoBehaviour>serializableFieldComponentsWhitelist used when above flag is false.
publicboolEnableSaveSlotsEnable fixed-count slot system.
publicboolInfiniteSaveSlotsAllow unlimited slots (timestamp filenames).
publicintAmountOfSaveSlotsMaximum slot count when slots are enabled.
publicintSlotsToSaveToActive slot index used by inspector buttons.
publicstringSaveSlotNameFilename pattern (must contain INDEX% and end in .json).
publicboolEnableFileEncryptionToggle AES-256 at-rest encryption.
publicstringencryptionPassword48-character passphrase (first 32 chars → key, last 16 → IV).

Attributes

NamePurpose
SaveableMarks a field/property for persistence.
SaveableDefaultResetSupplies a JSON-compatible default when no saved data exist.
SaveableIgnoreExplicitly exclude a member, even if Saveable is present.

Enums

EnumOptionsPurpose
PropertyListConfig.InclusionModeWhitelist, BlacklistDetermine whether the property list acts as an allow-list or block-list.

Document Revision History

DateVersionNotes
2023-10-281.0.0Initial release.
2024-07-172.0.0Dynamic serialisation, full type support, UI overhaul.