Demigiant / dotween

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

int id not working through TweenParams Object #542

Closed Ibrahim-Rashwan closed 2 years ago

Ibrahim-Rashwan commented 2 years ago

When Assigning an id using TweenParams and check for that id later using the DOTween static functions it's not returning the tween maybe the because the refrence of the object changed at some point when copying data from the params to the tween using the SetAs() function

defParams = TweenParams.Params; //Assign the parameters from start defParams.SetId(1);

transform.DOScale(1, 1).SetAs(defParams); //When calling the tween making sure to copy the parameters

DOTween.TweensById(1); // always returning 0 means didn't find the tween

Notes: SetAutoKill -> false Tried this with int id's only When i used SetId(1) as the tween directly it worked normally

Demigiant commented 2 years ago

Ouch, you're right, both string IDs and int IDs are not set correctly via TweenParams, sorry. Here's an update that fixes it.

Ibrahim-Rashwan commented 2 years ago

Ouch, you're right, both string IDs and int IDs are not set correctly via TweenParams, sorry. Here's an update that fixes it.

Thanks for the quick reply will check the update...