PlaneRun/Assets/Scripts/randomText.cs

17 lines
295 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class randomText : MonoBehaviour
{
public TMP_Text txt;
public string[] randomTexts;
void Start()
{
txt.text = randomTexts[Random.Range(0, randomTexts.Length)];
}
}