Unity/Csharp/Dialog
ナビゲーションに移動
検索に移動
Comfirmダイアログを作成
- Ui/Panelを追加
- Panel内に、Ui/Buttonを2つ追加
void Start() {
GameObject.Find("ConfirmButton").GetComponent<Button>().onClick.AddListener(OnClickConfirm);
GameObject.Find("DeleteButton").GetComponent<Button>().onClick.AddListener(OnClickDelete);
GameObject.Find("CancelButton").GetComponent<Button>().onClick.AddListener(OnClickCancel);
GameObject.Find("Panel").transform.position = new Vector3(10000, 0, 0);
}
void OnClickConfirm()
{
GameObject.Find("Panel").transform.position = new Vector3(0, 0, 0);
}
void OnClickDelete()
{
}
void OnClickCancel() {
GameObject.Find("Panel").transform.position = new Vector3(10000, 0, 0);
}
ジェネリックインターフェースでダイアログ
Unity/Csharp/クラス/ジェネリックインターフェース [ショートカット]