void Initialize( [Inject] DisposableManager dManager, [Inject] Service.Events.IEventsService eventService, [Inject] Service.AsyncManager.IAsyncManager asyncManager ) { _dManager = dManager; _eventService = eventService; _asyncManager = asyncManager; // register as disposable _dManager.Add(this); try { System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); watch.Start(); AfterInitialize(); watch.Stop(); #if UNITY_EDITOR || DEVELOPMENT_BUILD UnityEngine.Debug.LogWarning($"Service /*name:serviceName*/PrototypeService/*endname*/ AfterInitialize() took {watch.Elapsed.TotalSeconds}s"); #endif Observable.NextFrame().Subscribe(_ => { InitAPI(); }); } catch (Exception e) { UnityEngine.Debug.LogError("Catched exception in AfterInitialize() from service:" + GetType()); UnityEngine.Debug.LogException(e); } }
void Initialize( [Inject] DisposableManager dManager, [Inject] Service.Events.IEventsService eventService, [Inject] Service.AsyncManager.IAsyncManager asyncManager ) { _dManager = dManager; _eventService = eventService; _asyncManager = asyncManager; // register as disposable _dManager.Add(this); AfterInitialize(); }
void Initialize( [Inject] DisposableManager dManager, [Inject] Service.Events.IEventsService eventService, [Inject] Service.AsyncManager.IAsyncManager asyncManager ) { _dManager = dManager; _eventService = eventService; _asyncManager = asyncManager; // register as disposable _dManager.Add(this); try { AfterInitialize(); } catch (Exception e) { UnityEngine.Debug.LogError("Catched exception in Service-AfterInitialize() from service:" + GetType()); UnityEngine.Debug.LogException(e); } }
void Initialize( [InjectOptional] Service.AsyncManager.IAsyncManager asyncManager ) { _asyncManager = asyncManager; }