diff --git a/development/cpp/custom_godot_servers.rst b/development/cpp/custom_godot_servers.rst index eb1588dd4..4d52fabd5 100644 --- a/development/cpp/custom_godot_servers.rst +++ b/development/cpp/custom_godot_servers.rst @@ -481,7 +481,7 @@ Summing it up Here is the GDScript sample code: -.. code:: +:: extends Node diff --git a/development/cpp/custom_resource_format_loaders.rst b/development/cpp/custom_resource_format_loaders.rst index 1d4e1d10c..9b8937cb1 100644 --- a/development/cpp/custom_resource_format_loaders.rst +++ b/development/cpp/custom_resource_format_loaders.rst @@ -265,7 +265,7 @@ Loading it on GDScript ] } -.. code:: +:: extends Node diff --git a/getting_started/scripting/cross_language_scripting.rst b/getting_started/scripting/cross_language_scripting.rst index 493f447fe..fcc7de009 100644 --- a/getting_started/scripting/cross_language_scripting.rst +++ b/getting_started/scripting/cross_language_scripting.rst @@ -75,7 +75,7 @@ Using C# from GDScript doesn't need much work. Once loaded (see :ref:`doc_gdscript_classes_as_resources`) the script can be instantiated with :ref:`new() `. -.. code-block:: gdscript +:: var my_csharp_script = load("res://path_to_cs_file.cs") var my_csharp_node = my_csharp_script.new() @@ -116,7 +116,7 @@ Accessing C# fields from GDScript Accessing C# fields from GDScript is straightforward, you shouldn't have anything to worry about. -.. code-block:: gdscript +:: print(my_csharp_node.str1) # bar my_csharp_node.str1 = "BAR" @@ -160,7 +160,7 @@ marshalling process will do its best to cast your the arguments to match function signatures. If that's impossible you'll see the following error: ``Invalid call. Nonexistent function `FunctionName```. -.. code-block:: gdscript +:: my_csharp_node.PrintNodeName(self) # myGDScriptNode # my_csharp_node.PrintNodeName() # This line will fail. diff --git a/tutorials/plugins/android/android_plugin.rst b/tutorials/plugins/android/android_plugin.rst index 973373919..50c488728 100644 --- a/tutorials/plugins/android/android_plugin.rst +++ b/tutorials/plugins/android/android_plugin.rst @@ -264,7 +264,7 @@ The module should include the full Java path. For our example: ``org/godotengine Then, from your script: -.. code:: +:: if Engine.has_singleton("MySingleton"): var singleton = Engine.get_singleton("MySingleton")