protected void InitializeView() { GameObject loadedObject = ObjectPoolManager.Instantiate(this._viewPrefabName); this._view = loadedObject.GetComponent <TView>(); this._view.AddShowDismissEvents(this); CanvasUtil.ParentUIElementToCanvas(loadedObject, CanvasUtil.ScreenSpaceMainCanvas); IContextContainer contextContainer = this._view as IContextContainer; if (contextContainer == null) { Debug.LogError("InitializeView: view is not an IContextContainer, probably should be!"); } else { contextContainer.ProvideContext(this); } this.OnViewInitialized(); }