Hello everyone, I'm having an issue with using TweenAlpha.Begin(), where the Duration parameter does not seem to apply correctly.
What I'm doing in code:
TweenAlpha.Begin(playerUIControlParent.gameObject, fadePlayerUIControls, 0f);
Description of Issue:
Pretty simple, I have a UI Widget that starts with a alpha of 1, and should fade to 0 over time. The problem is that this "transition" happens almost instantly (a few frames) even when the Duration is multiple seconds. I've tried changing the type of "Play Style" from "Once" to "Ping Pong" / "Loop" and everything seems fine as far as the duration is concerned, but as soon as I try it with "Once" again, it happens more/less instantly again.
Any ideas on what I'm doing wrong is appreciated, thank you for reading.
UPDATE:
It seems the issue was related to pausing the editor before the TweenAlpha script was finished running (in this case I was Breaking() one line after TweenAlpha.Begin() was called). As helped to be confirmed by r.pedra, Tween calculates time while the Editor is paused if Ignore timescale is checked. Once the Break() was removed, TweenAlpha's time duration worked correctly.