You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which means that the intended usage of screens is something like:
void OnExit()
{
this.FadeOut(1000);
// Expecting the screen to die after 1000ms.
}
The problem is that UpdateChildrenLife occurs prior to children being updated, which may cause unintended effects if the transforms aren't updated for the final time. It's likely fine for something like a FadeOut() because the final frame will already be at a low alpha value, but consider the following situation:
In this case, the effect is not fine as it leaves the sample with >0 volume in the final frame.
This expiry process probably needs to be re-considered a bit, and this may even be an issue outside of screens too because the base UpdateChildrenLife() implementation works much the same way.
The text was updated successfully, but these errors were encountered:
If/when this is fixed, we should revisit adding a global sound fade on OsuScreen (as proposed here). We aren't doing this for now because there's a small chance it will never fully perform the fade.
ScreenStack
implements its own children life updates:osu-framework/osu.Framework/Screens/ScreenStack.cs
Lines 377 to 395 in 37e1475
When screens are exited they are
.Expire()
d, calculating their expiry time asLatestTransformEndTime
:osu-framework/osu.Framework/Screens/ScreenStack.cs
Lines 315 to 319 in 37e1475
Which means that the intended usage of screens is something like:
The problem is that
UpdateChildrenLife
occurs prior to children being updated, which may cause unintended effects if the transforms aren't updated for the final time. It's likely fine for something like aFadeOut()
because the final frame will already be at a low alpha value, but consider the following situation:In this case, the effect is not fine as it leaves the sample with >0 volume in the final frame.
This expiry process probably needs to be re-considered a bit, and this may even be an issue outside of screens too because the base
UpdateChildrenLife()
implementation works much the same way.The text was updated successfully, but these errors were encountered: