浏览代码

Fixed GetNodeOrNull<T>

GetNodeOrNull<T> was using GetNode instead of GetNodeOrNull
Fabián L 5 年之前
父节点
当前提交
f595486076
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs

+ 1 - 1
modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs

@@ -9,7 +9,7 @@ namespace Godot
 
         public T GetNodeOrNull<T>(NodePath path) where T : class
         {
-            return GetNode(path) as T;
+            return GetNodeOrNull(path) as T;
         }
 
         public T GetChild<T>(int idx) where T : class