ソースコード
使用例
using DG.Tweening; using UnityEngine; public class Example : MonoBehaviour { private async void Start() { var t = transform; await t.DOMove( Random.onUnitSphere, 1 ); // 移動 await t.DORotate( Random.rotation.eulerAngles, 1 ); // 回転 await t.DOScale( Random.insideUnitSphere, 1 ); // 拡縮 await DOTween.To( value => { }, 0, 1, 1 ); } }
TweenExt.cs を Unity プロジェクトに導入することで
DOTween で async / await を使用できるようになります