実現したいこと
テキストを文末に追加したいです。
AppendTextを利用しようとしているのですが、エラーが出てしまいます。
エラーメッセージ
'Text'に'AppendText'の定義が含まれておらず、型 'Text' の最初の引数を受け付ける拡張メソッド'AppendText'が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。
該当のソースコード
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class A : MonoBehaviour
{
public GameObject TextBox;
public void Main()
{
Text text = TextBox.GetComponent<Text>();
text.AppendText("");
}
}
C#
回答1件
あなたの回答
tips
プレビュー