namespace Godot { public partial class Node { public T GetNode(NodePath path) where T : class { return (T)GetNode(path); } public T GetNodeOrNull(NodePath path) where T : class { return GetNode(path) as T; } public T GetChild(int idx) where T : class { return (T)GetChild(idx); } public T GetChildOrNull(int idx) where T : class { return GetChild(idx) as T; } public T GetOwner() where T : class { return (T)GetOwner(); } public T GetOwnerOrNull() where T : class { return GetOwner() as T; } public T GetParent() where T : class { return (T)GetParent(); } public T GetParentOrNull() where T : class { return GetParent() as T; } } }