using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public class PlayerAccountData { public string userName; public List characterNames = new List(); public PlayerAccountData() { userName = "Player1"; characterNames = new List(); } public PlayerAccountData(string userName) { this.userName = userName; characterNames = new List(); } public PlayerAccountData(string userName, List characters) { this.userName = userName; characterNames = characters; } public void AddCharacterToPlayerAccount(string characterName) { if (!characterNames.Contains(characterName)) { characterNames.Add(characterName); Debug.Log("Added: " + characterName + " to account with name: " + userName); } else Debug.Log($"Failed to add {characterName} because this account already contains this name on the list"); } }