Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.3k stars 346 forks source link

Error when using a Sequence without tweeners in it #588

Closed piscopancer closed 1 year ago

piscopancer commented 1 year ago
public void Teleport(Location location)
    {
        Actions.OnStartedTeleporting?.Invoke(location);
        Sequence teleportSQ = DOTween.Sequence();
        teleportSQ.AppendInterval(3);
        teleportSQ.AppendCallback(delegate
        {
            LocationBase.gameObject.SetActive(false);
            LocationReactor.gameObject.SetActive(false);
            location.gameObject.SetActive(true);
            CurrentLocation = location;
            transform.SetPositionAndRotation(location.SpawnPoint.position, location.SpawnPoint.rotation);
            Actions.OnTeleported?.Invoke(location);
        });
    }

Is it suggested to not work? What is inside append callback is causing an error