Installation
TinySave is designed to work out of the box with minimal configuration. This guide covers installation and initial setup.
Requirements
- Unity 2021.3 or later
- Compatible with both Mono and IL2CPP scripting backends
- Works on all platforms (Windows, Mac, Linux, iOS, Android, WebGL, Console)
Installation Steps
- Import the TinySave package into your Unity project
- Unity will automatically import all necessary files
- No additional configuration required - you’re ready to use TinySave!
Project Structure
After installation, you’ll find TinySave organized in your project:
Assets/
TinySave/
Runtime/
Core/ - Core save/load logic
Components/ - MonoBehaviour components
Interfaces/ - ISaveCallbacks, ISaveCustom, ISaveMigration
Attributes/ - [SaveField] attribute
Models/ - Save file data structuresVerify Installation
Create a simple test script to verify TinySave is working:
using UnityEngine;
using TinySave.Runtime;
public class InstallTest : MonoBehaviour
{
[SaveField]
public int testValue = 42;
async void Start()
{
// Add a SaveID component
if (!GetComponent<SaveID>())
gameObject.AddComponent<SaveID>();
// Try saving
await SaveManager.SaveAsync("test");
Debug.Log("TinySave is working! Save file created.");
// Check if the file exists
bool exists = SaveManager.HasSlot("test");
Debug.Log($"Test slot exists: {exists}");
// Get the save file path
string path = SaveManager.GetSlotPath("test");
Debug.Log($"Save file location: {path}");
}
}Attach this script to any GameObject and run your scene. You should see success messages in the console.
Default Save Location
TinySave saves files to platform-specific locations:
- Windows:
%USERPROFILE%/AppData/LocalLow/[CompanyName]/[ProductName]/ - Mac:
~/Library/Application Support/[CompanyName]/[ProductName]/ - Linux:
~/.config/unity3d/[CompanyName]/[ProductName]/ - iOS/Android: Application.persistentDataPath
You can customize the save location using SaveManagerConfig.StorageBasePath.
Optional Configuration
TinySave works with sensible defaults, but you can customize behavior if needed:
Using SaveManagerConfig
using TinySave.Runtime;
void Awake()
{
var config = SaveManagerConfig.CreateDefault();
config.FileExtension = "sav"; // Change file extension
config.StorageBasePath = "C:/MyGameSaves"; // Custom save location
SaveManager.Configure(config);
}Using TinySaveSettings (PlayerPrefs-based)
using TinySave.Runtime;
void Awake()
{
// Settings are automatically persisted to PlayerPrefs
TinySaveSettings.defaultSettings.storageBasePath = "/custom/path";
// Apply settings to SaveManager
var config = TinySaveSettings.defaultSettings.ToConfig();
SaveManager.Configure(config);
}Next Steps
Last updated on