コード例 #1
0
    public void SetDialogTextBox(string newText)
    {
        Canvas          canvas          = DialogTextBoxGameObject.GetComponentInChildren <Canvas>();
        RectTransform   rectTransform   = canvas.gameObject.GetComponentInChildren <RectTransform>();
        TextMeshProUGUI textMeshProUGUI = rectTransform.gameObject.GetComponentInChildren <TextMeshProUGUI>();

        textMeshProUGUI.text = newText;
    }
コード例 #2
0
 public void ToggleDialogTextBox()
 {
     DialogTextBoxGameObject.SetActive(!DialogTextBoxGameObject.activeInHierarchy);
 }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     DialogTextBoxGameObject = Instantiate(dialogTextBoxModel, this.gameObject.transform.position, Quaternion.identity);
     DialogTextBoxGameObject.SetActive(false);
 }