Skip to content

Custom Data Storage

HoangVanThu edited this page Jun 24, 2024 · 1 revision

What

  • 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.

Advantage

Debug

image

View data

image

Uses

  • Create new data
[Serializable]
public partial class PlayerData
{
     [SerializeField] private float newData;
}
  • Save data manually
PlayerDataController.Instance.SaveData()
  • Load data manually
PlayerDataController.Instance.LoadData()
Clone this wiki locally