I am trying to record a simple animation, I created a canvas and I added a text field where it is written “Loading”, all I want to do is on the 0.15 second record Loading. on 0.30 second record Loading… and on 0.45 Second record Loading… (i just want to add dot animations Loading., Loading…, Loading…), however when I change the text the animation doesn’t add a key to it and it simple does not detect the text change, and I don’t get the animation of Loading… any suggestions how can I fix the problem??
You can’t change the text input using Animation, you’ll have to go the coroutine way in the script
bool loadingIsDone = false;
private void Awake()
{
StartCoroutine(Loading());
}
IEnumerator Loading()
{
TextMeshProUGUI loadingText = "Get Your Text Here"
WaitForSeconds delay = new WaitForSeconds(0.25f);
while (!loadingIsDone)
{
loadingText.text = "Loading";
yield return delay;
loadingText.text = "Loading.";
yield return delay;
loadingText.text = "Loading..";
yield return delay;
loadingText.text = "Loading...";
yield return delay;
}
}
and of course it’ll stop when the loadingIsDone = true;