private void SetScreenshotButton() { if (screenshotButton == null) { screenshotButton = Instantiate(screenshotButtonPrefab, playSceneCanvas.transform); screenshotButton.GetComponent <Button>().onClick.AddListener(() => buttonManager.ClickScreenshotButton()); screenshotCtrl.UIList.Add(screenshotButton); Debug.Log($"GamePanelCtrl ::: {screenshotButton.name}"); } else { screenshotButton.SetActive(!screenshotButton.activeSelf); } }