From 048bb2775e4369925572524ae53927b8b29501bd Mon Sep 17 00:00:00 2001 From: tetrapod00 <145553014+tetrapod00@users.noreply.github.com> Date: Sun, 9 Feb 2025 16:12:45 -0800 Subject: [PATCH] Update links to C# and GDScript sections - Change all links to '_doc' anchors instead of 'toc's. - Move 'doc_c_sharp' and 'doc_gdscript' to the index pages. - Add 'doc_gdscript_reference' anchor. - Update all existing links to point to the right place, updating grammar if needed. --- about/list_of_features.rst | 6 +++--- getting_started/introduction/introduction_to_godot.rst | 4 ++-- getting_started/step_by_step/scripting_first_script.rst | 5 ++--- getting_started/step_by_step/scripting_languages.rst | 2 +- tutorials/performance/cpu_optimization.rst | 4 ++-- tutorials/scripting/c_sharp/c_sharp_basics.rst | 2 -- tutorials/scripting/c_sharp/index.rst | 5 ++++- tutorials/scripting/cross_language_scripting.rst | 3 ++- tutorials/scripting/gdscript/gdscript_basics.rst | 2 +- tutorials/scripting/gdscript/gdscript_styleguide.rst | 2 +- tutorials/scripting/gdscript/index.rst | 2 ++ 11 files changed, 20 insertions(+), 17 deletions(-) diff --git a/about/list_of_features.rst b/about/list_of_features.rst index 7a81ee918..dfcedbdb6 100644 --- a/about/list_of_features.rst +++ b/about/list_of_features.rst @@ -451,16 +451,16 @@ Scripting - Support for :ref:`cross-language scripting `. - Many 2D, 3D and 4D linear algebra data types such as vectors and transforms. -:ref:`GDScript: ` +:ref:`GDScript: ` -- :ref:`High-level interpreted language ` with +- :ref:`High-level interpreted language ` with :ref:`optional static typing `. - Syntax inspired by Python. However, GDScript is **not** based on Python. - Syntax highlighting is provided on GitHub. - :ref:`Use threads ` to perform asynchronous actions or make use of multiple processor cores. -:ref:`C#: ` +:ref:`C#: ` - Packaged in a separate binary to keep file sizes and dependencies down. - Supports .NET 8 and higher. diff --git a/getting_started/introduction/introduction_to_godot.rst b/getting_started/introduction/introduction_to_godot.rst index 16fe4c1c3..5851b731b 100644 --- a/getting_started/introduction/introduction_to_godot.rst +++ b/getting_started/introduction/introduction_to_godot.rst @@ -71,9 +71,9 @@ Programming languages Let's talk about the available programming languages. -You can code your games using :ref:`GDScript `, a +You can code your games using :ref:`GDScript `, a Godot-specific and tightly integrated language with a lightweight syntax, or -:ref:`C# `, which is popular in the games industry. +:ref:`C# `, which is popular in the games industry. These are the two main scripting languages we support. With the GDExtension technology, you can also write diff --git a/getting_started/step_by_step/scripting_first_script.rst b/getting_started/step_by_step/scripting_first_script.rst index 9c2bcc9a8..38ad646bb 100644 --- a/getting_started/step_by_step/scripting_first_script.rst +++ b/getting_started/step_by_step/scripting_first_script.rst @@ -26,9 +26,8 @@ The equivalent C# code has been included in another tab for convenience. .. image:: img/scripting_first_script_rotating_godot.gif .. seealso:: To learn more about GDScript, its keywords, and its syntax, head to - the :ref:`GDScript reference`. - -.. seealso:: To learn more about C#, head to the :ref:`C# basics ` page. + the :ref:`doc_gdscript` section. To learn more about C#, + head to the :ref:`doc_c_sharp` section. Project setup ------------- diff --git a/getting_started/step_by_step/scripting_languages.rst b/getting_started/step_by_step/scripting_languages.rst index a1961b2fb..cde7c62fa 100644 --- a/getting_started/step_by_step/scripting_languages.rst +++ b/getting_started/step_by_step/scripting_languages.rst @@ -133,7 +133,7 @@ officially supported .NET option. Android and iOS platform support is available as of Godot 4.2, but is experimental and :ref:`some limitations apply `. -.. seealso:: To learn more about C#, head to the :ref:`C# basics ` page. +.. seealso:: To learn more about C#, head to the :ref:`doc_c_sharp` section. C++ via GDExtension ~~~~~~~~~~~~~~~~~~~ diff --git a/tutorials/performance/cpu_optimization.rst b/tutorials/performance/cpu_optimization.rst index 1d9629651..fdfd579c6 100644 --- a/tutorials/performance/cpu_optimization.rst +++ b/tutorials/performance/cpu_optimization.rst @@ -170,7 +170,7 @@ code, consider moving those calculations to a faster language. GDScript ~~~~~~~~ -:ref:`GDScript ` is designed to be easy to use and iterate, +:ref:`GDScript ` is designed to be easy to use and iterate, and is ideal for making many types of games. However, in this language, ease of use is considered more important than performance. If you need to make heavy calculations, consider moving some of your project to one of the other @@ -179,7 +179,7 @@ languages. C# ~~ -:ref:`C# ` is popular and has first-class support in Godot. It +:ref:`C# ` is popular and has first-class support in Godot. It offers a good compromise between speed and ease of use. Beware of possible garbage collection pauses and leaks that can occur during gameplay, though. A common approach to workaround issues with garbage collection is to use *object diff --git a/tutorials/scripting/c_sharp/c_sharp_basics.rst b/tutorials/scripting/c_sharp/c_sharp_basics.rst index 3532be623..bc9b5b267 100644 --- a/tutorials/scripting/c_sharp/c_sharp_basics.rst +++ b/tutorials/scripting/c_sharp/c_sharp_basics.rst @@ -1,5 +1,3 @@ -.. _doc_c_sharp: - C# basics ========= diff --git a/tutorials/scripting/c_sharp/index.rst b/tutorials/scripting/c_sharp/index.rst index 30911e7d4..e817ef49c 100644 --- a/tutorials/scripting/c_sharp/index.rst +++ b/tutorials/scripting/c_sharp/index.rst @@ -1,10 +1,13 @@ :allow_comments: False +.. _doc_c_sharp: + C#/.NET ======= C# is a high-level programming language developed by Microsoft. Godot supports -C# as an option for a scripting language, alongside Godot's own :ref:`GDScript`. +C# as an option for a scripting language, alongside Godot's own +:ref:`GDScript `. The standard Godot executable does not contain C# support out of the box. Instead, to enable C# support for your project you need to `download a .NET version `_ diff --git a/tutorials/scripting/cross_language_scripting.rst b/tutorials/scripting/cross_language_scripting.rst index 6ab7c4b09..56bb7991f 100644 --- a/tutorials/scripting/cross_language_scripting.rst +++ b/tutorials/scripting/cross_language_scripting.rst @@ -166,7 +166,8 @@ and :ref:`GodotObject.Set() `. The first argument is th Keep in mind that when setting a field value you should only use types the GDScript side knows about. -Essentially, you want to work with built-in types as described in :ref:`doc_gdscript` or classes extending :ref:`class_Object`. +Essentially, you want to work with built-in types as described in +:ref:`doc_gdscript_builtin_types` or classes extending :ref:`class_Object`. Calling methods --------------- diff --git a/tutorials/scripting/gdscript/gdscript_basics.rst b/tutorials/scripting/gdscript/gdscript_basics.rst index 60fa034df..38b28191c 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.rst +++ b/tutorials/scripting/gdscript/gdscript_basics.rst @@ -1,4 +1,4 @@ -.. _doc_gdscript: +.. _doc_gdscript_reference: GDScript reference ================== diff --git a/tutorials/scripting/gdscript/gdscript_styleguide.rst b/tutorials/scripting/gdscript/gdscript_styleguide.rst index eb03cd7fe..948b3d714 100644 --- a/tutorials/scripting/gdscript/gdscript_styleguide.rst +++ b/tutorials/scripting/gdscript/gdscript_styleguide.rst @@ -817,7 +817,7 @@ first line of the script. Follow with the optional ``@icon`` then the ``class_name`` if necessary. You can turn a GDScript file into a global type in your project using ``class_name``. For more -information, see :ref:`doc_gdscript`. +information, see :ref:`doc_gdscript_basics_class_name`. Then, add the ``extends`` keyword if the class extends a built-in type. diff --git a/tutorials/scripting/gdscript/index.rst b/tutorials/scripting/gdscript/index.rst index 8ad213e11..99eb3d2e2 100644 --- a/tutorials/scripting/gdscript/index.rst +++ b/tutorials/scripting/gdscript/index.rst @@ -1,5 +1,7 @@ :allow_comments: False +.. _doc_gdscript: + GDScript ========