Skip to content

Instantly share code, notes, and snippets.

@baobao
Created October 29, 2019 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baobao/a54b2620e4d88c5e51c6093eaa56c954 to your computer and use it in GitHub Desktop.
Save baobao/a54b2620e4d88c5e51c6093eaa56c954 to your computer and use it in GitHub Desktop.
using System;
using System.Threading;
using System.Threading.Tasks;
using DG.Tweening;
using UnityEngine;
// DOTweenAwaiterExtensionサンプルコード(キャンセル処理なし)
public class DOTweenAwaiterExtensionSample : MonoBehaviour
{
async void Start()
{
// 2秒かけてx:3
await transform.DOLocalMoveX(3f, 2f).ToAwaiter();
// 2秒かけてy:3
await transform.DOLocalMoveY(3f, 2f).ToAwaiter();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment