Root nodes join through ModRoot.AddDeferred, so a reload that unloads the mod first never hands Godot a freed node
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
11a386a16b
commit
83c0039d52
1 file changed
+2
-2
@@ -49,8 +49,8 @@ namespace Cthangover.Mods.Audio
|
||||
// setting up autoload children, so a direct AddChild is rejected.
|
||||
// Deferred calls run in FIFO order, which keeps AudioService ahead
|
||||
// of MusicPlayerBehaviour — its OnReady resolves AudioService.
|
||||
root.CallDeferred("add_child", new AudioService { Name = "AudioService" });
|
||||
root.CallDeferred("add_child", new MusicPlayerBehaviour { Name = "MusicPlayer" });
|
||||
ModRoot.AddDeferred(new AudioService { Name = "AudioService" });
|
||||
ModRoot.AddDeferred(new MusicPlayerBehaviour { Name = "MusicPlayer" });
|
||||
}
|
||||
|
||||
private static void EnsureEventSubscriptions()
|
||||
|
||||
Reference in new issue
Block a user