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
There are issues with "ScreenFader.cs" when it is frequently called, such as freezing and abnormal fading speed. For instance, when I switch scenes in quick succession, like entering a scene and immediately exiting to the main menu, it may freeze.
Steps to Reproduce
Create a new script:
public class Test : MonoBehaviour
{
public bool isFading; // for observation
void Update()
{
if (Input.GetKeyDown(KeyCode.E))
{
StartCoroutine(ScreenFader.FadeSceneIn());
}
if (Input.GetKeyDown(KeyCode.R))
{
StartCoroutine(ScreenFader.FadeSceneOut());
}
isFading = ScreenFader.IsFading;
}
}
Set Fade Duration to 1 or above, repeatedly pressing R and E will trigger the issue.
Solution
In the file Gamekit3D/Assets/3DGamekit/Packages/SceneManagement/Runtime/ScreenFader.cs, modify the Fade method as follows:
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
There are issues with "ScreenFader.cs" when it is frequently called, such as freezing and abnormal fading speed. For instance, when I switch scenes in quick succession, like entering a scene and immediately exiting to the main menu, it may freeze.
Steps to Reproduce
Create a new script:
Set Fade Duration to 1 or above, repeatedly pressing R and E will trigger the issue.
Solution
In the file Gamekit3D/Assets/3DGamekit/Packages/SceneManagement/Runtime/ScreenFader.cs, modify the Fade method as follows:
When alpha, finalAlpha, fadeSpeed*Time.deltaTime is close to 0, because the precision of the floating-point number loses the correct result.
The text was updated successfully, but these errors were encountered: