Data Save
Encryption & Compression
Quick Start
- Add the
SetupWizardcomponent to any GameObject - Enable "Auto Generate Slot" in the inspector
- Use the two-line API:
// Save data
DataManager.Save("playerLevel", 5);
// Load data
int level = DataManager.Load<int>("playerLevel");
Main API Class
All functionality is accessed through the static DataManager class.
Core Operations
void Save(string key, object value)
Saves a value with the specified key (synchronous)
Task SaveAsync(string key, object value)
Saves a value with the specified key (asynchronous)
T Load<T>(string key)
Loads a value from the specified key, returns default if not found
void DeleteValue(string key)
Deletes the value associated with the specified key
Task DeleteValueAsync(string key)
Deletes the value associated with the specified key (asynchronous)
Save Slot Management
void CreateSaveSlot(string name)
Creates a new save slot with the specified name
void DeleteSaveSlot(string name)
Deletes the save slot with the specified name
void RenameSaveSlot(string oldName, string newName)
Renames an existing save slot
void SetActiveSlot(string name)
Sets the active save slot for all operations
void DeleteAllSaveSlots()
Deletes all save slots
List<SaveSlot> GetSaveSlots()
Returns a list of all save slots
bool DoesSlotExist(string name)
Checks if a save slot with the specified name exists
bool IsValidSlotName(string name)
Validates that a slot name contains valid characters for file operations
Supported Data Types
- Classes, Structs
- Lists, Arrays
- Vector2, Vector3, Vector4, Vector2Int, Vector3Int
- Quaternion
- Color, Color32
- Rect, RectInt
- Bounds, BoundsInt
- Matrix4x4
- Ray, Ray2D
- Plane
- AnimationCurve
- Gradient
Supported Platforms
Windows
✅
macOS
✅
Linux
✅
Android
✅
iOS
✅
WebGL
✅
Console
❌
WebGL Support
Important
WebGL builds do not support async methods due to platform limitations. Use the synchronous methods instead:
- Use
Save()instead ofSaveAsync() - Use
DeleteValue()instead ofDeleteValueAsync()