mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:45:33 +00:00
Use proper scene load function in all cases
This commit is contained in:
parent
7acc344986
commit
c5ed30f458
5 changed files with 12 additions and 5 deletions
|
|
@ -27,7 +27,7 @@ public partial class GlobalState : Node
|
|||
// The solution is to defer the load to a later time, when
|
||||
// we can be sure that no code from the current scene is running:
|
||||
|
||||
CallDeferred(MethodName.DeferredGotoScene, path);
|
||||
CallDeferred(MethodName.DeferredGotoScene, path, new MapStartDataResource());
|
||||
}
|
||||
|
||||
public void GoToScene(string path, MapStartDataResource startData)
|
||||
|
|
@ -53,6 +53,9 @@ public partial class GlobalState : Node
|
|||
// Optionally, to make it compatible with the SceneTree.change_scene_to_file() API.
|
||||
GetTree().CurrentScene = CurrentScene;
|
||||
|
||||
// // Update current scene here too
|
||||
// CurrentScene = GetTree().Root.GetChild(-1);
|
||||
|
||||
if (startData is not null)
|
||||
{
|
||||
// Call deferred if it gives issues
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue