feat: cleanups and API updates

This commit is contained in:
redglow
2026-07-29 09:38:54 +02:00
parent fc1df2f740
commit 2c0a3f47a4
9 changed files with 68 additions and 46 deletions
+9 -4
View File
@@ -78,15 +78,20 @@ public partial class Plugin : EditorPlugin
// mark debounce as completed
_sceneTreeTimer = null;
// check that the instance is still valid after debouncing (could have been disposed)
if (!IsInstanceValid(sceneRoot)) return;
var sceneNodes = sceneRoot.FindChildren("*").Where(node => node.Owner == sceneRoot).Append(sceneRoot).ToList();
GD.Print($"Updating injection for root {sceneRoot.Name}");
// get all nodes belonging to this root
var sceneNodes = sceneRoot
.FindChildren("*")
.Where(node => node.Owner == sceneRoot)
.Append(sceneRoot)
.ToList();
// GD.Print($"Updating injection for root {sceneRoot.Name} ({sceneNodes.Count} nodes)");
// look for the service source
var serviceSource = sceneNodes.Where(child => child.IsServiceSource())
var serviceSource = sceneNodes
.Where(child => child.IsServiceSource())
.Single(out var failureReason);
switch (failureReason)