using System; using UnityEditor; using UnityEngine; namespace VOID.Generic.SaveLoad { [Serializable] public class PlayerProfile { public string guid; public string name; public string version; public int essence; public PlayerProfile(string profileName) { name = profileName; guid = GUID.Generate().ToString(); version = Application.version; } public static bool operator ==(PlayerProfile obj1, PlayerProfile obj2) => obj1?.guid == obj2?.guid; public static bool operator !=(PlayerProfile obj1, PlayerProfile obj2) => !(obj1 == obj2); public override bool Equals(object obj) => obj is PlayerProfile other && guid == other.guid; public override int GetHashCode() => guid.GetHashCode(); } }