Код: Выделить всё
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class stegamove : MonoBehaviour
{
Animator animator;
[SerializeField] private Transform _stega;
void Start()
{
animator = GetComponent();
_stega.DOMove(new Vector3(-2.05f, -0.56f, -3.06f), 3).SetEase(Ease.InSine).OnComplete(() =>
{
Debug.Log("Here");
animator.Play("Armature|Stegasaurus_Stomp");
});
}
// Update is called once per frame
void Update()
{
}
}
Код: Выделить всё
_stega.DOMove(new Vector3(-2.05f, -0.56f, -3.06f), 3).SetEase(Ease.InSine).OnComplete(() =>
{
Debug.Log("Here");
animator.Play("Armature|Stegasaurus_Stomp");
});
Код: Выделить всё
_stega.DOMove(new Vector3(-2.05f, -0.56f, -3.06f), 3).SetEase(Ease.InSine).OnComplete(() =>
{
Debug.Log("Here");
animator.Play("Armature|Stegasaurus_Stomp");
}).SetLoops(-1,LoopType.Restart);
Как это исправить?
Подробнее здесь: https://stackoverflow.com/questions/786 ... en-looping
Мобильная версия