Browse Source

Merge pull request #3358 from Calinou/best-practices-clarify-enum-string

Clarify how string enums are created in the Data preferences page
Max Hilbrunner 5 years ago
parent
commit
b935b0fd5b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      getting_started/workflow/best_practices/data_preferences.rst

+ 4 - 4
getting_started/workflow/best_practices/data_preferences.rst

@@ -273,10 +273,10 @@ limited only by their imagination.
 Enumerations: int vs. string
 Enumerations: int vs. string
 ----------------------------
 ----------------------------
 
 
-Most languages offer an enumeration type option. GDScript is no different,
-but unlike most other languages, it allows one to use either integers or
-strings for the enum values. The question then arises, "which should one
-use?"
+Most languages offer an enumeration type option. GDScript is no different, but
+unlike most other languages, it allows one to use either integers or strings for
+the enum values (the latter only when using the ``export`` keyword in GDScript).
+The question then arises, "which should one use?"
 
 
 The short answer is, "whichever you are more comfortable with." This
 The short answer is, "whichever you are more comfortable with." This
 is a feature specific to GDScript and not Godot scripting in general;
 is a feature specific to GDScript and not Godot scripting in general;