Skip to content

Loading screen issue #40

@architektor

Description

@architektor

Hello,

I have an issue with the transition animations for my loading screen. My goal is for the LoadingScreen to smoothly fade in after the MenuScreen fades out, and then transition to the Level1 with a fade out effect once the loading is complete. However, the LoadingScreen does not fade in, it appears instantly, and similarly disappears abruptly, bypassing the intended fade out effect when Level1 is ready to be displayed. The transition for Level1 works correctly with a fade in effect.

Here is sample setup:

  1. MenuScreen with button to load Level1
func _on_start_pressed():
	SceneManager.set_recorded_scene("level_1")
	var fade_out_options = SceneManager.create_options(1.0, "fade", 0.2, true)
	var fade_in_options = SceneManager.create_options(1.0, "fade", 0.2, true)
	var general_options = SceneManager.create_general_options(Color(0, 0, 0), 1, false, false)
	SceneManager.change_scene("loading_screen", fade_out_options, fade_in_options, general_options)
  1. LoadingScreen
func _ready():
	SceneManager.load_finished.connect(loading_finished)
	SceneManager.load_scene_interactive(SceneManager.get_recorded_scene())

func loading_finished():
	var fade_out_options = SceneManager.create_options(1.0, "fade", 0.2, true)
	var fade_in_options = SceneManager.create_options(1.0, "fade", 0.2, true)
	var general_options = SceneManager.create_general_options(Color(0, 0, 0), 0, false, false)
	SceneManager.change_scene_to_loaded_scene(fade_out_options, fade_in_options, general_options)
  1. Level1
func _on_ready():
	SceneManager.load_finished.emit()

Could anyone suggest how to ensure the LoadingScreen respects the fade in and out animations? Any advice would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions