-
Notifications
You must be signed in to change notification settings - Fork 14
Data Storage
HoangVanThu edited this page Oct 28, 2024
·
5 revisions
- The game system is stored through the CustomDataStorage package. Data is stored in Binary format, which fast and secure. See more in GameData.cs script.
- PlayerDataController.cs is a MonoBehaviour script that manages, transfers, and displays all player data. Additionally, PlayerDataController automatically saves the data.
- All data is defined in the partial classes of PlayerData.cs.
- Create new data
[Serializable]
public partial class PlayerData
{
[SerializeField] private float newData;
}
- Save data manually
PlayerDataController.Instance.SaveData()
- Load data manually
PlayerDataController.Instance.LoadData()