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.


Messages - DaMex86

Pages: [1]
1
DOTween & DOTween Pro / Re: Unsolvable error
« on: May 11, 2015, 02:52:02 PM »
Hi there !

Thank you for your answer ! Those informations were really helpfull :)

2
DOTween & DOTween Pro / Re: Unsolvable error
« on: May 07, 2015, 04:52:59 PM »
Hi again,

I just want to say that we kind of resolved the problem by delaying the destroy of the gameobject (we just disable it at first and then destroy after a reasonable amount of time) but it would be great if I could have the answers for the different questions I asked

3
DOTween & DOTween Pro / Unsolvable error
« on: May 07, 2015, 02:47:19 PM »
Hi there,

In our project we've been working with hotween but we changed to dotween for more efficiency and optimisation. Actually everything is going fine but just a single problem, a warning (which is an error when not set to safety mode) that happens when we destroy a gameobject on which several related tweens were running).

The code that controls the destruction of this game object is unique (its the only place where it can happen and when it is handled). But in some cases, at destroy we get this warning turning around a null callback in the DOTween stack. Here it is :

Code: [Select]
DOTWEEN :: An error inside a tween callback was silently taken care of > The object of type 'Transform' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Debug:LogWarning(Object)
DG.Tweening.Core.Debugger:LogWarning(Object) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/Debugger.cs:26)
DG.Tweening.Tween:OnTweenCallback(TweenCallback) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:265)
DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Tween.cs:244)
DG.Tweening.Core.TweenManager:Update(UpdateType, Single, Single) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:390)
DG.Tweening.Core.DOTweenComponent:Update() (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/DOTweenComponent.cs:50)

At the gameobject's destruction we kill the tweens running on the gameobject => DOTween.Kill(gameObject) who is supposed to kill all the tweens related to it, even in children ?! Because in HOTween we had to specify if it does include the tweens running on children or not, this feature doesn't exist anymore in DOTween.

We actually added another tween kill control in the OnDestroy Event of the gameObject to make sure that all the running tweens get killed before destruction :

Code: [Select]
void OnDestroy()
    {
        DOTween.Kill(transform);
        DOTween.Kill(gameObject);
        foreach (Transform child in transform)
        {
            DOTween.Kill(child);
        }
    }

But the warning is still here ! Any knowledge about this issues or are we missing something around ?

Thank you for your answers.

Pages: [1]