- Home /
Question by
Harnen · Jul 12, 2021 at 01:43 AM ·
build errorcolor changeload scene
Changing color not work in build. It works in editor.
I made a code for scene fade out. It changes color during given time, and then load a scene. In editor, both works well, but in the build, it does not change color even though changing scene works well.
void Update()
{
if (fadeOutStart == false)
return;
timer += Time.deltaTime;
if (timer > fadeoutTime)
{
// Change scene.
SceneManager.LoadScene(sceneName, LoadSceneMode.Single);
return;
}
// Change color.
color.a = timer / fadeoutTime;
blackImage.color = color;
}
Thank you for reading, and any suggestions will welcome.
Comment
Your answer
Follow this Question
Related Questions
Terrain changes color in WebGL build 2 Answers
Error running MLDB install Building for Magic Leap 2 Answers
How to fail build in Unity 2017.4? 0 Answers
problem with android build 1 Answer
NGUI Slider foreground color change 1 Answer