private IEnumerator InitInEditor() { var newRemConf = new GameObject(nameof(RemoteConfigsService)); _remoteConfigsService = newRemConf.AddComponent <RemoteConfigsService>(); _remoteConfigsService.UpdateConfigs(); while (_remoteConfigsService.IsFetching) { yield return(null); } Debug.LogWarning("Configs UPDATED SUCCESS"); StartCoroutine(Prepare()); }
private void Awake() { if (_backGround == null) { throw new ArgumentNullException(nameof(_backGround)); } if (_btnBack == null) { throw new ArgumentNullException(nameof(_btnBack)); } if (_btnRestart == null) { throw new ArgumentNullException(nameof(_btnRestart)); } if (_chefUI == null) { throw new ArgumentNullException(nameof(_chefUI)); } if (_gameResult == null) { throw new ArgumentNullException(nameof(_gameResult)); } if (_starsUI == null) { throw new ArgumentNullException(nameof(_starsUI)); } if (_vegetablesRootParent == null) { throw new ArgumentNullException(nameof(_vegetablesRootParent)); } _remoteConfigsService = FindObjectOfType <RemoteConfigsService>(); if (_remoteConfigsService == null) { StartCoroutine(InitInEditor()); } else { StartCoroutine(Prepare()); } }
private void Awake() { if (_backGround == null) { throw new ArgumentNullException(nameof(_backGround)); } if (_btnPlay == null) { throw new ArgumentNullException(nameof(_btnPlay)); } _remoteConfigsService = FindObjectOfType <RemoteConfigsService>(); if (_remoteConfigsService == null) { var newRemConf = new GameObject(nameof(RemoteConfigsService)); _remoteConfigsService = newRemConf.AddComponent <RemoteConfigsService>(); } StartCoroutine(ShowSplashScreen()); StartCoroutine(UpdateConfigsProcess()); }