以下の内容はhttps://baba-s.hatenablog.com/entry/2023/12/11/084449より取得しました。


【Unity】DOTween の DORotateChar で duration に 0 を指定した時に動作しない場合

ソースコード

using DG.Tweening;
using TMPro;
using UnityEngine;

[DisallowMultipleComponent]
internal sealed class Example : MonoBehaviour
{
    [SerializeField] private TMP_Text m_text;

    private void Start()
    {
        var animator = new DOTweenTMPAnimator( m_text );
        animator.DORotateChar( 0, Vector3.back * -90, 0 );
    }
}

上記のようなコードを書いたら文字が回転しない現象に遭遇した

using System.Collections;
using DG.Tweening;
using TMPro;
using UnityEngine;

[DisallowMultipleComponent]
internal sealed class Example : MonoBehaviour
{
    [SerializeField] private TMP_Text m_text;

    private IEnumerator Start()
    {
        yield return null;
        var animator = new DOTweenTMPAnimator( m_text );
        animator.DORotateChar( 0, Vector3.back * -90, 0 );
    }
}

1 フレーム待機したら回転するようになった




以上の内容はhttps://baba-s.hatenablog.com/entry/2023/12/11/084449より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14