Переглянути джерело

Merge pull request #78270 from RedworkDE/net-version-define-4.0

[4.0] C#: Add version defines to help users deal with breaking changes
Rémi Verschelde 2 роки тому
батько
коміт
4ba4ed6528

+ 7 - 2
modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props

@@ -74,8 +74,13 @@
 
   <!-- Godot DefineConstants. -->
   <PropertyGroup>
-    <!-- Define constant to identify Godot builds. -->
-    <GodotDefineConstants>GODOT</GodotDefineConstants>
+    <!-- Define constants to identify Godot builds and versions. GODOT4_0_0_OR_GREATER to GODOT4_0_3_OR_GREATER are omitted because the versions defines don't exist for these version. -->
+    <GodotDefineConstants>
+      GODOT;
+      GODOT4;GODOT4_OR_GREATER;
+      GODOT4_0;GODOT4_0_OR_GREATER;
+      GODOT4_0_4;GODOT4_0_4_OR_GREATER;
+    </GodotDefineConstants>
 
     <!--
     Define constant to determine the target Godot platform. This includes the