diff --git a/tutorials/export/exporting_for_dedicated_servers.rst b/tutorials/export/exporting_for_dedicated_servers.rst index 161199e73ef..5c84fcf96ef 100644 --- a/tutorials/export/exporting_for_dedicated_servers.rst +++ b/tutorials/export/exporting_for_dedicated_servers.rst @@ -217,7 +217,7 @@ main scene (or an autoload)'s ``_ready()`` method: .. tabs:: .. code-tab:: gdscript - if "--headless" in OS.get_cmdline_args(): + if DisplayServer.get_name() == "headless": # Run your server startup code here... # # Using this check, you can start a dedicated server by running @@ -229,7 +229,7 @@ main scene (or an autoload)'s ``_ready()`` method: using System.Linq; - if (OS.GetCmdlineArgs().Contains("--headless")) + if (DisplayServer.GetName() == "headless") { // Run your server startup code here... //