View on Asset Store (opens in new tab)
Package details
- Latest version
- 3.0.0
- Last updated
- First released
- Unity version
- 2022.3.56 or later
- Package size
- 592 KB
- Files
- 18
- Favorites
- 4
- Views in the past week
- 8
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $4.99 on
Keywords
Smart Pref
SmartPref enhances PlayerPrefs with sections and versioning. Use flexible save modes (PlayerPrefs or FileSystem), and benefit from in-memory caching for fast access.
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 7
Smart Pref screenshot 1
About this asset
SmartPref – Smarter PlayerPrefs for Unity
SmartPref is a powerful and easy-to-use replacement for Unity’s built-in PlayerPrefs.
It adds versioning, namespacing (sections), caching, and JSON-based file saving so you can safely manage player data across updates, multiple save slots, and user profiles.
Store any data type – int, float, string, custom classes, structs, lists, and more.
Separate data into sections – perfect for profiles, game modes, and users.
Built-in versioning system – handle updates, migrations, and multiple save versions.
Dual save modes – use Unity’s PlayerPrefs or JSON FileSystem storage.
In-memory caching – faster reads and reduced disk access.
Immediate delete flush – DeleteKey() and DeleteAll() remove data instantly.
Deferred or immediate saving – batch large updates or write instantly when needed.
Optional Base64 encoding – protect data from tampering or inspection.
Custom debug interface – plug in your own logging system.
Cross-platform ready – works seamlessly on PC, mobile, and console builds.
SmartPref gives you the flexibility of PlayerPrefs,
the reliability of JSON, and the performance of caching — all in one API.
From the publisher's Asset Store listing.
Technical details
Advanced PlayerPrefs Management – Organize your data with sections and namespaces, powered by the SmartPrefSectioner. Each section isolates its keys to prevent overlap across profiles or systems.
Version Control System – Maintain multiple save versions using the built-in SmartPrefVersioner. Easily migrate, copy, or clear specific versions without touching others. Ideal for game updates or seasonal content.
Supports All Serializable Data Types – Store any type supported by Unity’s JsonUtility:
int, float, string, bool, Vector3, Color, custom classes, and even lists or structs. Everything is serialized automatically for you.
Automatic Key Handling & Registry – SmartPref maintains an internal key index for every save entry. This ensures clean, consistent key management — you can fetch, list, or delete all saved keys without manually tracking them.
Multiple Profiles / Sections – Seamlessly create separate data spaces for different users, levels, game modes, or save slots. Just initialize a new SmartPrefSectioner("ProfileName") and you have an isolated save zone.
Dual Save Modes (PlayerPref / FileSystem) –
Choose between Unity’s PlayerPrefs or a JSON-based FileSystem backend:
- PlayerPref Mode: Classic lightweight storage.
- SmartPref automatically falls back to PlayerPrefs on unsupported platforms like WebGL.FileSystem Mode: Saves data as .json files under Application.persistentDataPath, allowing structured or larger datasets.
In-Memory Caching Layer – Recently used data is cached in memory for instant access and reduced disk I/O. Greatly improves runtime performance when saving or retrieving frequently accessed values.
Immediate vs Deferred Saving –
Set SmartPref.immidiateSave = false to batch large writes, or leave it true for instant persistence.
Unsaved data is tracked and automatically written during SmartPref.ImmidiateSave() calls.
Instant Deletion (Flush-Safe) –
SmartPref.DeleteKey() and SmartPref.DeleteAll() immediately remove data from memory and persistent storage, guaranteeing instant cleanup — no deferred writes left behind.
Optional Base64 Encoding – Enable SmartPref.encode = true to protect save data from tampering or inspection. Data is transparently encoded and decoded at runtime.
Custom Debug System – Plug in your own CustomDebug class to redirect logs to the Unity console, your own debug panel, or external analytics tools. All SmartPref operations provide detailed context through the logger.
Cross-Platform & Safe – Works seamlessly on PC, Mac, iOS, Android, and Console builds, using Unity’s Application.persistentDataPath for file storage.
Lightweight & Drop-In Replacement –
SmartPref mimics the standard PlayerPrefs API (Set, Get, HasKey, DeleteKey) with extended versions for sections, versioning, and data migration. No refactors needed — just smarter saving.
Compatibility
| Unity version | Built-in | URP | HDRP | Custom |
|---|---|---|---|---|
| 2022.3.56f1 | Compatible | Compatible | Compatible | Compatible |
As listed on the Asset Store.