public void VideoEnded(VideoPlayer p) { videoPlayer.isLooping = false; GameObject confirmP = Instantiate(confirmPanel); confirmP.transform.SetParent(GameObject.Find("Canvas").transform, false); ConfirmPanel confirm = confirmP.GetComponent <ConfirmPanel>(); confirm.SetMessage("これで物語は完結となります。このままトレードを続けますか?"); confirm.GetComponent <ConfirmPanel>().SetOkDelegate(() => { SceneManager.LoadScene("GameScene"); }); confirm.GetComponent <ConfirmPanel>().SetCancelDelegate(() => { SceneManager.LoadScene("TitleScene"); }); }