using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; namespace AibisDream.Test { public class OptionTest : MonoBehaviour { private GameObject panel; private GameObject prefab; void Start() { DialogController.Instance.RegisterOptionCommand("show_buttons", ShowButtons); panel = transform.GetChild(0).gameObject; prefab = Resources.Load("Perfabs/UI/Choice Button"); } public void ShowButtons(YarnOption[] options) { foreach (YarnOption option in options) { var instance = Instantiate(prefab); instance.transform.SetParent(panel.transform); instance.GetComponentInChildren().text = option.Text; instance.GetComponent