MoDDiB / dotween

Automatically exported from code.google.com/p/dotween
0 stars 0 forks source link

DoStartup SafeMode Handling #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm running into an issue around DoStartup (a delayed tween has its object 
destroyed before the tween kicks in).  Could you add the SafeMode handling 
around DoStartup, like it does for ApplyTween?

Thanks!

Stack Trace below:

MissingReferenceException: 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.Transform.get_localScale ()
DG.Tweening.ShortcutExtensions+<>c__DisplayClass5c.<DOScale>b__5a () (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/ShortcutEx
tensions.cs:245)
DG.Tweening.Tweener.DoStartup[Vector3,Vector3,VectorOptions] 
(DG.Tweening.Core.TweenerCore`3 t) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Tweener.cs
:122)
DG.Tweening.Core.TweenerCore`3[UnityEngine.Vector3,UnityEngine.Vector3,DG.Tweeni
ng.Plugins.Core.DefaultPlugins.Options.VectorOptions].Startup () (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
erCore.cs:117)
DG.Tweening.Tween.DoGoto (DG.Tweening.Tween t, Single toPosition, Int32 
toCompletedLoops, UpdateMode updateMode) (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Tween.cs:1
54)
DG.Tweening.Core.TweenManager.Update (Single deltaTime, Single independentTime) 
(at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/Core/Tween
Manager.cs:178)
DG.Tweening.DOTween.Update () (at 
D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween.Assembly/DOTween/DOTween.cs
:87)

Original issue reported on code.google.com by thematth...@gmail.com on 4 Sep 2014 at 4:45

GoogleCodeExporter commented 8 years ago
There is already safe mode handling in DOStartup, but I realized I wasn't 
catching all necessary exceptions, my bad. I fixed it now. Can you try this 
last version I'm attaching and see if it works?

Also, you'll find it has an additional DOTween43.dll included (which I will use 
to add shortcuts that require Unity 4.3 or later, so in case someone wants to 
use DOTween on older Unity versions they can just delete the DOTween43 files), 
which has the SpriteRender shortcuts you were asking for (I'm going to release 
this version officially in a short while): DOColor, DOColorFrom, DOFade, 
DOFadeFrom

Also, very important: THANKS a lot for the donation :)

Original comment by daniele....@gmail.com on 4 Sep 2014 at 5:38

Attachments:

GoogleCodeExporter commented 8 years ago
The fix works beautifully.  Thanks so much for the quick turnaround and for 
creating this awesome library!

Original comment by thematth...@gmail.com on 4 Sep 2014 at 5:42

GoogleCodeExporter commented 8 years ago
Great! And thanks to you!

Original comment by daniele....@gmail.com on 4 Sep 2014 at 6:09