From c138ee01eb4383a39ce272e07915316bb4d4ae57 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Tue, 20 Aug 2024 16:51:48 +0200 Subject: [PATCH] C#: Remove references to GODOT_SERVER and GODOT_HTML5 defines - The `GODOT_SERVER` preprocessor define is no longer available in Godot 4, since the dedicated server platform was removed. - Replaced a reference to `GODOT_HTML5` with `GODOT_WEB` since that platform was also renamed in Godot 4. - Remove note about `` that only really applies to Godot 3. --- tutorials/scripting/c_sharp/c_sharp_features.rst | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tutorials/scripting/c_sharp/c_sharp_features.rst b/tutorials/scripting/c_sharp/c_sharp_features.rst index b3d8d1e8b..94e9d539d 100644 --- a/tutorials/scripting/c_sharp/c_sharp_features.rst +++ b/tutorials/scripting/c_sharp/c_sharp_features.rst @@ -102,10 +102,6 @@ Preprocessor defines Godot has a set of defines that allow you to change your C# code depending on the environment you are compiling to. -.. note:: If you created your project before Godot 3.2, you have to modify - or regenerate your `csproj` file to use this feature - (compare ```` with a new 3.2+ project). - Examples ~~~~~~~~ @@ -115,10 +111,7 @@ For example, you can change code based on the platform: public override void _Ready() { - #if GODOT_SERVER - // Don't try to load meshes or anything, this is a server! - LaunchServer(); - #elif GODOT_32 || GODOT_MOBILE || GODOT_WEB + #if (GODOT_32 || GODOT_MOBILE || GODOT_WEB) // Use simple objects when running on less powerful systems. SpawnSimpleObjects(); #else @@ -167,7 +160,7 @@ Full list of defines * One of ``GODOT_64`` or ``GODOT_32`` is defined depending on if the architecture is 64-bit or 32-bit. * One of ``GODOT_LINUXBSD``, ``GODOT_WINDOWS``, ``GODOT_OSX``, - ``GODOT_ANDROID``, ``GODOT_IOS``, ``GODOT_HTML5``, or ``GODOT_SERVER`` + ``GODOT_ANDROID``, ``GODOT_IOS``, ``GODOT_WEB`` depending on the OS. These names may change in the future. These are created from the ``get_name()`` method of the :ref:`OS ` singleton, but not every possible OS