void Awake() { if (Instance == null) { Instance = this; } }
void OnDestroy() { if (Instance == this) { Instance = null; SceneManager.activeSceneChanged -= OnSceneChange; } }
public virtual async Task SaveGlobalAppSettings(SecurityManagerClient secMgr, string entLookup, GlobalApplicationSettings settings) { log.LogInformation($"Saving global app settings {entLookup} at {State.ActiveHost}: {settings.ToJSON()}"); await settings.Metadata.Each(async (setting) => { var resp = await secMgr.SetEnterpriseThirdPartyData(entLookup, new Dictionary <string, string>() { { $"{State.ActiveHost}:{setting.Key}", setting.Value.ToString() } }); return(!resp.Status); }); await LoadGlobalAppSettings(secMgr, entLookup); }