Answers for "Saving Data in Unity: Custom Binary Files"

0

Saving Data in Unity: Custom Binary Files

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class GameData
{
  public int score = 0;

  public void AddScore(int points)
  {
    score += points;
  }

  public void ResetData()
  {
    score = 0;
  }
}
Posted by: Guest on March-23-2021

Browse Popular Code Answers by Language