feat: cleanups and API updates
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user