You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I create an animation of typing text, and everything is fine, but when the camera starts moving at this time, the animation it breaks down. This is reproduced if the canvas on which the text animation takes place is screenspace-camera. if overlay is configured, then everything is fine, but this setting bothers me.
There was also a problem that I couldn't set the text transparency character-by-character in advance (ChangeSymbolsAlpha), changing the color completely for the component (ChangeTextMainColor) helped, so don't be surprised by this oddity :)
here I give an example of minimally reproducible code.
void Awake(){
textAnimator = new DOTweenTMPAnimator(m_text);
}
void Main(){
m_text.text = _data.text;
ChangeTextMainColor(0f);
//ChangeSymbolsAlpha(0f); //not worked
await scaleTween;
ShowTextAsync();
}
protected async UniTask ShowTextAsync()
{
await UniTask.Yield();
if (fadeTween != null)
{
fadeTween.Kill();
}
textAnimator.Reset();
fadeTween = DOTween.Sequence();
for (int i = 0; i < textAnimator.textInfo.characterCount; ++i)
{
int num = i;
if (!textAnimator.textInfo.characterInfo[num].isVisible) continue;
var color = textAnimator.GetCharColor(num);
color.a = 1f;
fadeTween.Insert(charAnimDuration*i,textAnimator.DOColorChar(num, color, charAnimDuration));
}
await fadeTween;
fadeTween = null;
ChangeTextMainColor(1f);
}
void ChangeTextMainColor(float _alpha)
{
Color textColor = m_text.color;
textColor.a = _alpha;
m_text.color = textColor;
}
void ChangeSymbolsAlpha(float _alpha)
{
for (int i = 0; i < textAnimator.textInfo.characterCount; ++i)
{
if (!textAnimator.textInfo.characterInfo[i].isVisible) continue;
var color = textAnimator.GetCharColor(i);
color.a = _alpha;
textAnimator.SetCharColor(i, color);
}
}
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hello
I create an animation of typing text, and everything is fine, but when the camera starts moving at this time, the animation it breaks down. This is reproduced if the canvas on which the text animation takes place is screenspace-camera. if overlay is configured, then everything is fine, but this setting bothers me.
There was also a problem that I couldn't set the text transparency character-by-character in advance (ChangeSymbolsAlpha), changing the color completely for the component (ChangeTextMainColor) helped, so don't be surprised by this oddity :)
here I give an example of minimally reproducible code.
The text was updated successfully, but these errors were encountered: