Snaparazzi/Assets/Scripts/FunnyText.cs

14 lines
321 B
C#

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class FunnyText : MonoBehaviour
{
public FunnyTextList textList;
private void OnEnable()
{
GetComponent<TextMeshProUGUI>().text = textList.funnyList[Random.Range(0, textList.funnyList.Count)];
}
}