public void SetPreferences(UnisavePreferences preferences) { Preferences = preferences; // TODO: load preferences / propagate event to services // Re-register dependant services }
public static ClientApplication GetInstance() { if (singletonInstance == null) { singletonInstance = new ClientApplication( UnisavePreferences.LoadOrCreate() ); } return(singletonInstance); }
public ClientApplication(UnisavePreferences preferences) { InEditMode = !UnityEngine.Application.isPlaying; Preferences = preferences; if (!InEditMode) { GameObject = new GameObject( "Unisave", typeof(UnisaveDisposalTrigger), typeof(HttpClientComponent) ); Object.DontDestroyOnLoad(GameObject); } RegisterServices(); }
public ClientApplication(UnisavePreferences preferences) { RegisterIndependentServices(); SetPreferences(preferences); }