AwesomeRunner/Assets/Scripts/UI/TextUIElement.cs
VladimirPirozhenko 45b277e7d1 Initial commit
2022-08-07 07:31:16 +03:00

21 lines
566 B
C#

using System.Collections;
using System.Collections.Generic;
using System.Text;
using TMPro;
using UnityEngine;
[RequireComponent(typeof(TextMeshProUGUI))]
public abstract class TextUIElement : MonoBehaviour
{
protected TextMeshProUGUI textMeshUI;
protected StringBuilder stringBuilder;
protected int originalStringLength;
void Awake()
{
textMeshUI = GetComponent<TextMeshProUGUI>();
stringBuilder = new StringBuilder();
stringBuilder.Append(textMeshUI.text);
originalStringLength = stringBuilder.Length;
}
}