feat: initial import
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using Godot;
|
||||
|
||||
namespace GodotHostTest.Helpers;
|
||||
|
||||
public static class NodeExtensions
|
||||
{
|
||||
public static void AddTo(this IDisposable disposable, Node node)
|
||||
{
|
||||
node.TreeExited += OnTreeExited;
|
||||
return;
|
||||
|
||||
void OnTreeExited()
|
||||
{
|
||||
disposable.Dispose();
|
||||
node.TreeExited -= OnTreeExited;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user