private void Awake() { if (loaded) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); loaded = true; instance = this; fullPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), fileName).Replace("\\", "/"); if (Load()) { BasicOrbit.BasicLogging("Settings file loaded"); } else { if (Save()) { BasicOrbit.BasicLogging("New Settings files generated at:\n{0}", fullPath); } } }
private void Awake() { if (instance != null) { Destroy(gameObject); } instance = this; settings = BasicSettings.Instance; }