Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kira

Pages: [1]
1
DOTween & DOTween Pro / Tween got killed without obvious reason
« on: November 24, 2015, 11:44:26 AM »
Hi, i got strange behavior of tween in my project.
Sometimes it's playing normally without problems. But sometimes it's got killed at the beginning or in the middle of tween.

Code: [Select]
_playerMapObject.DOLocalMove(targetPosition, playerMoveTime)
                                .OnStart(() =>
                                {
                                    Debug.Log("move started");
                                })
                                .OnPause(() =>
                                {
                                    Debug.Log("move paused");
                                })
                                .OnUpdate(() =>
                                {
                                    Debug.Log("move update, position: " + _playerMapObject.localPosition);
                                })
                                .OnKill(() =>
                                {
                                    Debug.Log("move killed");
                                })
                                .OnComplete(() =>
                                {
                                    if (needToPrestartNextLevel)
                                    {
                                        needToPrestartNextLevel = false;
                                        gpm.OpenLevel(curLevel);
                                    }
                                    Debug.Log("move complete");
                                });

_playerMapObject is Transform of GameObject, that contains child GameObject with 2dToolkit image attached
_playerMapObect.localPosition NEVER equals to targetPosition before tween call.
playerMoveTime always equals 0.5f

I tried to use SetAutoKill(true/false) on current tween and also set autoKill to true/false in DoTween Settings Panel. Anyway it can play fully or get killed after one or two OnUpdate calls or even just after OnStart call. Also i tried to set true/false on reuse tweens - same results.

I never use Kill for tweens so i think it's killed by DoTweenManager.

I'm using Unity 5.2.1f1 on Windows. Target platform Standalone. Used DoTween version 1.0.750. Update to version 1.1.060 changed nothing....

Please help me, project near release date, so i need to fast fix it.

Pages: [1]