Demigiant / dotween

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

Prefab instantiations acting in unison #562

Open MarkHelsinki opened 2 years ago

MarkHelsinki commented 2 years ago

I've attached the animator to a prefab (inventory item). But when the prefab is instantiated, all items are behaving as one item. I even successfully changed the ID's for each instantiation with dot.id = dotID++.ToString(); where dot is the DOTweenAnimation component, and dotID is an int that serves to provide a unique ID.

If I call DOTween through script on the Rect via the button press script for that item, the animation will run if played manually (through the Editor using Odin), but won't run when called via the item.button's OnClick at runTime.

I'm stuck. I've been trying all day to find what is the workaround for this. Any tips? Is this something that just isn't a feature or am I failing to do something?

The DOTween script I wrote works fine on other buttons, just not these item prefabs.

akshaybharwani commented 1 year ago

@MarkHelsinki Have you tried .SetAutoKill(false)?