소스 검색

Merge pull request #3601 from SimonLarsen/export_layers

Document export hints for physics and render layers
Max Hilbrunner 5 년 전
부모
커밋
3a47c96af1
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      getting_started/scripting/gdscript/gdscript_exports.rst

+ 7 - 0
getting_started/scripting/gdscript/gdscript_exports.rst

@@ -158,6 +158,13 @@ has value 4 and ``Wind`` corresponds to value 8. Usually, constants
 should be defined accordingly (e.g. ``const ELEMENT_WIND = 8`` and so
 should be defined accordingly (e.g. ``const ELEMENT_WIND = 8`` and so
 on).
 on).
 
 
+Export hints are also provided for the physics and render layers defined in the project settings::
+
+    export(int, LAYERS_2D_PHYSICS) var layers_2d_physics
+    export(int, LAYERS_2D_RENDER) var layers_2d_render
+    export(int, LAYERS_3D_PHYSICS) var layers_3d_physics
+    export(int, LAYERS_3D_RENDER) var layers_3d_render
+
 Using bit flags requires some understanding of bitwise operations. If in
 Using bit flags requires some understanding of bitwise operations. If in
 doubt, boolean variables should be exported instead.
 doubt, boolean variables should be exported instead.