Fade Out Transition Glitch

Godot Version

v4.6.2.stable.mono.official [71f334935]

Question

Hi,

I have made a very simple fade in / fade out transition for when I switch between scenes.

It’s simply a black ColorRect that covers the whole screen with an AnimationPlayer that fades the ColorRects opacity in and out from two different animations.

If I run a scene directly from the editor the transitions work perfectly. As soon as I change scene to file from code I end up with this horrid flickering where the fade in transition begins. It abruptly shows the whole scene without the black ColorRect covering everything, then pops it on and does the transition.

Does anyone know if this is some kind of Godot bug, or if there is anything I can do to transition smoothly between scenes?

Thanks!

You need to make sure to set the ColorRect to opaque before the scene is loaded.

Man, I thought that would of been it. Silly me had it’s opacity at 0 by default. I changed it to fully opaque by default, but it did not stop the flicker.

I am sure I have set something up incorrectly. I am thinking about changing my scene structure to be like this video https://www.youtube.com/watch?v=32h8BR0FqdI I hope once I get that set up and remake the scene transition the flicker will go away.

Thanks for trying!

I ended up just remaking the fade transition, I wanted to include a CanvasLayer anyways. Once I remade it, using the exact same code, the flicker disappeared and the transitions are smooth as butter.