public static GameManager Instance = null; //Static instance of GameManager which allows it to be accessed by any other script. void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); loadAll = null; }
public List <T> LoadListOfType <T>() where T : IDataObject, new() { return(LoadAll.From <T>().Using(DataAccessor).Load()); }