Godot Version
4.3 C#
Question
Basically, I have a loading screen that is used at the start of the game, to load the main menu first. Then, I click new game, using the loading screen again and once it’s loaded the first map I see the SDFGI quickly fade out. No matter what I do, changing the WorldEnvironment on the camera, enabling SDFGI every frame, nothing makes it come back. What’s going on??
Moreus
September 7, 2024, 7:12am
2
You give us nothings to workout. No code no screens…
well this is the entire loading screen code:
using Godot;
using System;
public partial class LoadingScreen : Control
{
[Export] public String NextScene { get; set; }
[Export] public Label LoadingText { get; set; }
private PackedScene NewScene;
private Global GlobalInstance = new();
private bool CompiledShaders = false;
public override void _Ready()
{
if (ResourceLoader.Exists(NextScene))
{
ResourceLoader.LoadThreadedRequest(NextScene);
}
}
public override void _Process(double delta)
{
switch (ResourceLoader.LoadThreadedGetStatus(NextScene))
{
case ResourceLoader.ThreadLoadStatus.Loaded:
if (CompiledShaders)
{
SetProcess(false);
NewScene = (PackedScene)ResourceLoader.LoadThreadedGet(NextScene);
GetTree().ChangeSceneToPacked(NewScene);
}
break;
case ResourceLoader.ThreadLoadStatus.Failed:
SetProcess(false);
GlobalInstance.ForceConsole(true);
break;
case ResourceLoader.ThreadLoadStatus.InvalidResource:
SetProcess(false);
GlobalInstance.ForceConsole(true);
QueueFree();
break;
default:
break;
}
}
public void ShadersCompiled()
{
CompiledShaders = true;
}
}