using UnityEngine;
// Save data to the asset data.username = "JohnDoe"; data.score = 100; unity save edit
// Load the saved data file = File.Open(Application.persistentDataPath + "/playerdata.dat", FileMode.Open); PlayerData loadedData = (PlayerData)formatter.Deserialize(file); file.Close(); using UnityEngine; // Save data to the asset data