Kaynağa Gözat

Merge pull request #35708 from MightyPrinny/patch-1

Mono: Fixed GetNodeOrNull<T>
Rémi Verschelde 5 yıl önce
ebeveyn
işleme
3c3ed67c39

+ 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
         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
         public T GetChild<T>(int idx) where T : class