void Start() { //This should be done in a popup factory GameObject gridPopup = GameObject.Instantiate(gridPopupPrefab, canvas.transform); GridPopupModel gridPopupModel = new GridPopupModel(); GridPopupPresenter gridPopupPresenter = new GridPopupPresenter(gridPopupModel, gridPopup.GetComponent <GridPopupView>()); }
public GridPopupPresenter(GridPopupModel model, GridPopupView view) { this.model = model; this.view = view; view.OnReloadClicked += UpdateModel; SetView(); }