/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private void OnEnable() { if (start) return; start = true; unitySingletons = target as UnitySingletons; }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private void BeforeInitializing() { if (_injector.HasDirectMapping(typeof(IContextView))) { IContextView contextView = _injector.GetInstance(typeof(IContextView)) as IContextView; unitySingletons = (contextView.view as Transform).gameObject.AddComponent<UnitySingletons>(); unitySingletons.SetFactory(_singletonFactory); } }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private void OnEnable() { if (start) { return; } start = true; unitySingletons = target as UnitySingletons; }