Hey Aren,
i have the following situation:
Unity 5.5.1f3
NGUI 3.11.2
I´m making a TowerDefense Game
i have a pool of sprites in my UI, all of them carry a tweenposition (disabled by default, so they not play instantly). When a sprite is requested, it gets setup (which sprite to show), the tween gets configured (start/end pos and duration) and the tween is Played forward.
OnTweenFinish the tween gets back into the bool (which means mainly it gets flagged as pooled and the sprite gets disabled.
The tween is set to NOT ignore timeScale (since we have time warp effects and the UI also should animate faster for this very panel)
Most of the time that works fine, but at some point the tweens start to play instantatiously, even the setup is correct (start != end, duration != 0)
As stated in my last post/quote i also tried differen versions of the play/rest combinations.
i used tween.PlayForward() as well as tween.Play(true)
i tried different versions of resetting the tween, like right before or after the play call as well as in the onTweenFinished Callback.
The bug allways happens at the same time, right after the first Wave is finished... in the second Wave the Bug allready is there. So it might be that it´s my fault, but i´m checking my code since hours and i can´t find the difference between wave1 and wave2 and my usage of the tweens.
Any idea what i might do wrong or could that actually be a NGUI bug?
Thanks in advance!
EDIT:
after some additional tests it became more likely that it´s an issue with NGUI.
In my usecase the poolsize was 10 and i reused more or less the same 3 items. at the time the bug occured i was reusing an item whos tween got finished right before it got claimed and used again. So what i did is to make sure that the whole pool got used, before reusing the same item again.
That time the tweens work for much longer (more waves, so it was nothing which happened between wave 1 and 2).
But it got locked again after the first item got reused about 7-8 times... maybe some racing conditions which only sometimes occure?