Introduction
Welcome to the DH Save System documentation. This guide provides all the information needed to integrate and utilize the DH Save System within your Unity projects. Designed to offer a robust and secure method for saving and loading game data, this system supports a wide variety of data types and ensures the security of your data through encryption.
1. Overview
The DH Save System distinguishes between global data (e.g., game settings) and slot-specific data (e.g., player progress) to provide flexible and secure data management. With built-in encryption and easy-to-use interfaces, it’s an essential tool for Unity developers looking to implement reliable save and load functionality.
2. Configuration
SaveSystemSettings: Accessible via Project Settings, this component allows for the configuration of encryption keys, auto-saving preferences, and key history management.
Save Data Window: A Unity Editor tool for viewing saved data directly, enhancing the development and debugging process.
3. SaveSystemManager
A runtime component that loads saved data upon game start. It supports custom converters for non-serializable classes, ensuring that all game data can be efficiently saved and loaded.
4. Basic Operations
Saving Data
Illustrates how to save both global and slot-specific data, with examples for various data types, including dictionaries and transforms.
Loading Data
Guides on retrieving saved data, with an emphasis on type safety and handling optional data.
5. Encryption
Details the encryption mechanism used to secure saved data, including setting up encryption keys and managing key history for data recovery.
6. SaveDataSlot Class
The SaveDataSlot
class manages individual game save slots within the DH Save System, encapsulating slot details like name, save timestamp, progress, and custom data. It simplifies save slot manipulation and querying, offering a robust framework for game save management.
Properties
- SlotName, LastSave, Progress, IndexSlot, SavePath, OtherData: Essential slot details including custom data storage.
Methods
- SetSlotName, SetProgress, SetOtherData<T>, GetOtherData<T>: Update slot information and manage custom data, supporting flexible data types for comprehensive save management.
7. SaveSystem Class
The SaveSystem
class is the core of the DH Save System, providing essential functionalities for saving and loading data. It facilitates access to both global data and individual save slots, ensuring secure and efficient data management across your game.
Properties
- GetCurrentSaveSlot, GetSaveDataSlots, GetGlobalData, GetSlotData: Accessors for retrieving current slots, all slots, and their respective data.
Methods
- Comprehensive coverage of all methods, from
Save
andLoad
to more specialized functions likeLoadTransform
andSerialize
.
8. Exceptions
Explains common exceptions (e.g., KeyAlreadyExistsException
, SaveSlotNotLoadedException
) and provides strategies for resolution, ensuring robust error handling.
9. Working with Serializable Types
SerializableDictionary and SerializableTransform
Demonstrates converting complex data types into serializable formats for saving, and vice versa for loading, complete with examples.
Contact & Support
For support, bug reports, or contributions, please contact via email: support@hurtaweb.cz
. We welcome your feedback and contributions to the project.