Unityのテキストをスクリプトで制御するとき、事前に表示していた文章を消さずに、続けて文章を表示させる方法はないでしょうか?
C#
1using System.Collections; 2using System.Collections.Generic; 3using UnityEngine; 4using UnityEngine.UI; 5 6public class GameManager : MonoBehaviour { 7 8 public Text targetText; 9 10 // Use this for initialization 11 void Start () { 12 targetText.text = "Planet was born."; 13 targetText.text = "OK"; 14 15 } 16 17 // Update is called once per frame 18 void Update () { 19 20 } 21} 22
上のスクリプトだと、Planet was born.は表示されず、OKだけが表示されてしまいます。
他のメソッドで、どんどんテキストを追加していく方法を取りたいので、これでは文章が上書きされ続けてしまいます。
〇理想
Planet was born.
OK.
・
・
・
回答お願いします。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/05/22 08:20
退会済みユーザー
2018/05/22 08:31