//in principle creates a popup - not currently finished implementing public GameObject CreatePopup() { GameObject popup = Instantiate(popupWindow) as GameObject; PopupWindow popWindow = popup.GetComponent <PopupWindow>(); popWindow.CreatePanel(); popup.SetActive(true); return(popup); }