浏览代码

Merge pull request #8375 from kleonc/get_configuration_warnings_csharp_example

Fix incorrect C# example using `_GetConfigurationWarnings`
Max Hilbrunner 1 年之前
父节点
当前提交
8d1f3d8617
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      tutorials/best_practices/godot_interfaces.rst

+ 5 - 3
tutorials/best_practices/godot_interfaces.rst

@@ -108,11 +108,13 @@ access.
         };
 
         // Warn users if the value hasn't been set.
-        public String _GetConfigurationWarnings()
+        public string[] _GetConfigurationWarnings()
         {
             if (EnemyScn == null)
-                return "Must initialize property 'EnemyScn'.";
-            return "";
+            {
+                return new string[] { "Must initialize property 'EnemyScn'." };
+            }
+            return Array.Empty<string>();
         }
     }