using System.Collections.Generic; using TMPro; using TankAndHealerStudioAssets; using UnityEngine; namespace UltimateChatBoxExample { public class KillFeedExampleTest : MonoBehaviour { public UltimateChatBox chatBox; public TMP_SpriteAsset spriteAsset; public List names = new List { "Player00", "Player01", "Player02", "Player03", "Player04" }; public void SendKillFeed(string weaponName) { string text = names[Random.Range(0, names.Count)]; string text2 = names[Random.Range(0, names.Count)]; while (text2 == text) { text2 = names[Random.Range(0, names.Count)]; } string text3 = text + " "; if (Random.Range(0, 10) > 8) { text3 += ""; } text3 = text3 + " " + text2; chatBox.RegisterChat(text3); } } }