From 044b6a74f8f8a230b182efbb1910c1c588cbb6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 7 Jun 2021 10:15:21 +0200 Subject: [PATCH] Cleanup uses of double spaces between words or after punctuation --- conf.py | 2 +- .../compiling_with_script_encryption_key.rst | 2 +- .../cpp/binding_to_external_libraries.rst | 10 +- .../cpp/configuring_an_ide/code_blocks.rst | 2 +- .../cpp/custom_resource_format_loaders.rst | 2 +- development/file_formats/tscn.rst | 2 +- tutorials/2d/2d_sprite_animation.rst | 22 +-- .../3d/procedural_geometry/arraymesh.rst | 2 +- tutorials/best_practices/data_preferences.rst | 2 +- tutorials/export/exporting_for_web.rst | 2 +- tutorials/inputs/input_examples.rst | 2 +- tutorials/io/saving_games.rst | 2 +- tutorials/math/beziers_and_curves.rst | 2 +- tutorials/networking/http_request_class.rst | 24 +-- tutorials/performance/gpu_optimization.rst | 2 +- .../animating_thousands_of_fish.rst | 6 +- .../controlling_thousands_of_fish.rst | 2 +- tutorials/physics/physics_introduction.rst | 2 +- tutorials/platform/android/android_plugin.rst | 157 ++++++++---------- tutorials/platform/ios/ios_plugin.rst | 2 +- tutorials/plugins/editor/making_plugins.rst | 3 +- .../rendering/gles2_gles3_differences.rst | 2 +- .../scripting/gdscript/gdscript_basics.rst | 2 +- .../shader_reference/spatial_shader.rst | 2 +- .../your_first_3d_shader.rst | 2 +- tutorials/vr/developing_for_oculus_quest.rst | 2 +- .../vr_starter_tutorial_part_one.rst | 2 +- .../vr_starter_tutorial_part_two.rst | 2 +- 28 files changed, 125 insertions(+), 141 deletions(-) diff --git a/conf.py b/conf.py index 4c936c3e1..da86ea59e 100644 --- a/conf.py +++ b/conf.py @@ -187,7 +187,7 @@ html_static_path = ["_static"] html_extra_path = ["robots.txt"] # These paths are either relative to html_static_path -# or fully qualified paths (eg. https://...) +# or fully qualified paths (e.g. https://...) html_css_files = [ "css/custom.css", ] diff --git a/development/compiling/compiling_with_script_encryption_key.rst b/development/compiling/compiling_with_script_encryption_key.rst index f1482be18..bbb0f33ad 100644 --- a/development/compiling/compiling_with_script_encryption_key.rst +++ b/development/compiling/compiling_with_script_encryption_key.rst @@ -75,5 +75,5 @@ it at runtime. :: - ERROR: open_and_parse: Condition ' String::md5(md5.digest) != String::md5(md5d) ' is true. returned: ERR_FILE_CORRUPT + ERROR: open_and_parse: Condition "String::md5(md5.digest) != String::md5(md5d)" is true. Returning: ERR_FILE_CORRUPT At: core/io/file_access_encrypted.cpp:103 diff --git a/development/cpp/binding_to_external_libraries.rst b/development/cpp/binding_to_external_libraries.rst index 7fbcc2dcc..3fcbb0be3 100644 --- a/development/cpp/binding_to_external_libraries.rst +++ b/development/cpp/binding_to_external_libraries.rst @@ -118,8 +118,8 @@ this module: env_tts = env.Clone() env_tts.add_source_files(env.modules_sources, "*.cpp") # Add all cpp files to the build -You'll need to install the external library on your machine to get the .a library files. See the library's official -documentation for specific instructions on how to do this for your operation system. We've included the +You'll need to install the external library on your machine to get the .a library files. See the library's official +documentation for specific instructions on how to do this for your operation system. We've included the installation commands for Linux below, for reference. .. code-block:: shell @@ -135,7 +135,7 @@ installation commands for Linux below, for reference. Please be sure to check the licenses and terms of use. The external library will also need to be installed inside your module to make the source -files accessible to the compiler, while also keeping the module code self-contained. The +files accessible to the compiler, while also keeping the module code self-contained. The festival and speech_tools libraries can be installed from the modules/tts/ directory via git using the following commands: @@ -153,9 +153,9 @@ can link to them instead by adding them as submodules (from within the modules/t git submodule add https://github.com/festvox/speech_tools .. important:: - Please note that Git submodules are not used in the Godot repository. If + Please note that Git submodules are not used in the Godot repository. If you are developing a module to be merged into the main Godot repository, you should not - use submodules. If your module doesn't get merged in, you can always try to implement + use submodules. If your module doesn't get merged in, you can always try to implement the external library as a GDNative C++ plugin. To add include directories for the compiler to look at you can append it to the diff --git a/development/cpp/configuring_an_ide/code_blocks.rst b/development/cpp/configuring_an_ide/code_blocks.rst index fcfcf360b..dc9b009d0 100644 --- a/development/cpp/configuring_an_ide/code_blocks.rst +++ b/development/cpp/configuring_an_ide/code_blocks.rst @@ -126,4 +126,4 @@ Under **General Settings**, on the **Editor Settings** tab, under **Tab Options* :figclass: figure-w480 :align: center -That's it. You're ready to start contributing to Godot using the Code::Blocks IDE. Remember to save the project file and the **Workspace**. If you run into any issues, ask for help in one of `Godot's community channels `__. +That's it. You're ready to start contributing to Godot using the Code::Blocks IDE. Remember to save the project file and the **Workspace**. If you run into any issues, ask for help in one of `Godot's community channels `__. diff --git a/development/cpp/custom_resource_format_loaders.rst b/development/cpp/custom_resource_format_loaders.rst index 5d7119728..59d18f4f4 100644 --- a/development/cpp/custom_resource_format_loaders.rst +++ b/development/cpp/custom_resource_format_loaders.rst @@ -291,7 +291,7 @@ calls into ``std::istream``. } } int uflow() { - return _file->eof_reached() ? EOF : _file->get_8(); + return _file->eof_reached() ? EOF : _file->get_8(); } private: diff --git a/development/file_formats/tscn.rst b/development/file_formats/tscn.rst index da6922a51..2b50c345b 100644 --- a/development/file_formats/tscn.rst +++ b/development/file_formats/tscn.rst @@ -304,7 +304,7 @@ heading. For example, a capsule collision shape looks like: :: - [sub_resource type="CapsuleShape" id=2] + [sub_resource type="CapsuleShape" id=2] radius = 0.5 height = 3.0 diff --git a/tutorials/2d/2d_sprite_animation.rst b/tutorials/2d/2d_sprite_animation.rst index 2041281a7..e640343c0 100644 --- a/tutorials/2d/2d_sprite_animation.rst +++ b/tutorials/2d/2d_sprite_animation.rst @@ -9,10 +9,10 @@ Introduction In this tutorial, you'll learn how to create 2D animated characters with the AnimatedSprite class and the AnimationPlayer. Typically, when you create or download an animated character, it will come in one of two ways: as individual images or as a single sprite sheet -containing all the animation's frames. Both can be animated in Godot with the AnimatedSprite class. +containing all the animation's frames. Both can be animated in Godot with the AnimatedSprite class. First, we'll use :ref:`AnimatedSprite ` to -animate a collection of individual images. Then we will animate a sprite sheet using this class. Finally, we will learn another way to animate a sprite sheet +animate a collection of individual images. Then we will animate a sprite sheet using this class. Finally, we will learn another way to animate a sprite sheet with :ref:`AnimationPlayer ` and the *Animation* property of :ref:`Sprite `. @@ -115,34 +115,34 @@ released. Sprite sheet with AnimatedSprite -------------------------------- -You can also easily animate from a sprite sheet with the class ``AnimatedSprite``. We will use this public domain sprite sheet: +You can also easily animate from a sprite sheet with the class ``AnimatedSprite``. We will use this public domain sprite sheet: .. image:: img/2d_animation_frog_spritesheet.png Right-click the image and choose "Save Image As" to download it, and then copy the image into your project folder. -Set up your scene tree the same way you did previously when using individual images. Select the ``AnimatedSprite`` and in its *SpriteFrames* property, select +Set up your scene tree the same way you did previously when using individual images. Select the ``AnimatedSprite`` and in its *SpriteFrames* property, select "New SpriteFrames". -Click on the new SpriteFrames resource. This time, when the bottom panel appears, select "Add frames from a Sprite Sheet". +Click on the new SpriteFrames resource. This time, when the bottom panel appears, select "Add frames from a Sprite Sheet". .. image:: img/2d_animation_add_from_spritesheet.png -You will be prompted to open a file. Select your sprite sheet. +You will be prompted to open a file. Select your sprite sheet. -A new window will open, showing your sprite sheet. The first thing you will need to do is to change the number of vertical and horizontal images in your sprite sheet. In this sprite sheet, we have four images horizontally and two images vertically. +A new window will open, showing your sprite sheet. The first thing you will need to do is to change the number of vertical and horizontal images in your sprite sheet. In this sprite sheet, we have four images horizontally and two images vertically. .. image:: img/2d_animation_spritesheet_select_rows.png -Next, select the frames from the sprite sheet that you want to include in your animation. We will select the top four, then click "Add 4 frames" to create the animation. +Next, select the frames from the sprite sheet that you want to include in your animation. We will select the top four, then click "Add 4 frames" to create the animation. .. image:: img/2d_animation_spritesheet_selectframes.png -You will now see your animation under the list of animations in the bottom panel. Double click on default to change the name of the animation to jump. +You will now see your animation under the list of animations in the bottom panel. Double click on default to change the name of the animation to jump. .. image:: img/2d_animation_spritesheet_animation.png -Finally, check Playing on the AnimatedSprite in the inspector to see your frog jump! +Finally, check Playing on the AnimatedSprite in the inspector to see your frog jump! .. image:: img/2d_animation_play_spritesheet_animation.png @@ -266,4 +266,4 @@ Summary These examples illustrate the two classes you can use in Godot for 2D animation. ``AnimationPlayer`` is a bit more complex than ``AnimatedSprite``, but it provides additional functionality, since you can also -animate other properties like position or scale. The class ``AnimationPlayer`` can also be used with an ``AnimatedSprite``. Experiment to see what works best for your needs. +animate other properties like position or scale. The class ``AnimationPlayer`` can also be used with an ``AnimatedSprite``. Experiment to see what works best for your needs. diff --git a/tutorials/3d/procedural_geometry/arraymesh.rst b/tutorials/3d/procedural_geometry/arraymesh.rst index 9b7857c50..aea60dabd 100644 --- a/tutorials/3d/procedural_geometry/arraymesh.rst +++ b/tutorials/3d/procedural_geometry/arraymesh.rst @@ -19,7 +19,7 @@ PackedInt32Array, etc.) for each type of information. - ``ARRAY_VERTEX`` = 0 | PackedVector3Array or PackedVector2Array - ``ARRAY_NORMAL`` = 1 | PackedVector3Array -- ``ARRAY_TANGENT`` = 2 | PackedFloat32Array of groups of 4 floats. first 3 floats determine the tangent, and +- ``ARRAY_TANGENT`` = 2 | PackedFloat32Array of groups of 4 floats. First 3 floats determine the tangent, and the last the binormal direction as -1 or 1. - ``ARRAY_COLOR`` = 3 | PackedColorArray - ``ARRAY_TEX_UV`` = 4 | PackedVector2Array or PackedVector3Array diff --git a/tutorials/best_practices/data_preferences.rst b/tutorials/best_practices/data_preferences.rst index 5cbd037b3..5a6bde5c2 100644 --- a/tutorials/best_practices/data_preferences.rst +++ b/tutorials/best_practices/data_preferences.rst @@ -85,7 +85,7 @@ Contiguous memory stores imply the following operation performance: This makes only 2 copies of the array (still constant time, but slow) versus copying roughly 1/2 of the array, on average, N times (linear time). -- **Get, Set:** Fastest *by position*. Ex. can request 0th, 2nd, 10th record, etc. +- **Get, Set:** Fastest *by position*. E.g. can request 0th, 2nd, 10th record, etc. but cannot specify which record you want. - Op: 1 addition operation from array start position up to desired index. diff --git a/tutorials/export/exporting_for_web.rst b/tutorials/export/exporting_for_web.rst index 3d0b17e89..ae066a6c8 100644 --- a/tutorials/export/exporting_for_web.rst +++ b/tutorials/export/exporting_for_web.rst @@ -285,7 +285,7 @@ Any other JavaScript value is returned as ``null``. HTML5 export templates may be :ref:`built ` without support for the singleton to improve security. With such templates, and on platforms other than HTML5, calling ``JavaScript.eval`` will also return -``null``. The availability of the singleton can be checked with the +``null``. The availability of the singleton can be checked with the ``JavaScript`` :ref:`feature tag `:: func my_func3(): diff --git a/tutorials/inputs/input_examples.rst b/tutorials/inputs/input_examples.rst index 4a561931e..87155f557 100644 --- a/tutorials/inputs/input_examples.rst +++ b/tutorials/inputs/input_examples.rst @@ -217,7 +217,7 @@ Keyboard modifiers ~~~~~~~~~~~~~~~~~~ Modifier properties are inherited from -:ref:`InputEventWithModifiers `. This allows +:ref:`InputEventWithModifiers `. This allows you to check for modifier combinations using boolean properties. Let's imagine you want one thing to happen when the :kbd:`T` is pressed, but something different when it's :kbd:`Shift + T`: diff --git a/tutorials/io/saving_games.rst b/tutorials/io/saving_games.rst index c22d485c6..aa1796f86 100644 --- a/tutorials/io/saving_games.rst +++ b/tutorials/io/saving_games.rst @@ -251,7 +251,7 @@ load function: { var saveGame = new File(); if (!saveGame.FileExists("user://savegame.save")) - return; // Error! We don't have a save to load. + return; // Error! We don't have a save to load. // We need to revert the game state so we're not cloning objects during loading. // This will vary wildly depending on the needs of a project, so take care with diff --git a/tutorials/math/beziers_and_curves.rst b/tutorials/math/beziers_and_curves.rst index 376ea0f02..28919abcd 100644 --- a/tutorials/math/beziers_and_curves.rst +++ b/tutorials/math/beziers_and_curves.rst @@ -190,7 +190,7 @@ Traversal The last common use case for the curves is to traverse them. Because of what was mentioned before regarding constant speed, this is also difficult. -To make this easier, the curves need to be *baked* into equidistant points. This way, they can be approximated with regular interpolation (which can be improved further with a cubic option). To do this, just use the :ref:`Curve.interpolate_baked()` method together with +To make this easier, the curves need to be *baked* into equidistant points. This way, they can be approximated with regular interpolation (which can be improved further with a cubic option). To do this, just use the :ref:`Curve.interpolate_baked()` method together with :ref:`Curve2D.get_baked_length()`. The first call to either of them will bake the curve internally. Traversal at constant speed, then, can be done with the following pseudo-code: diff --git a/tutorials/networking/http_request_class.rst b/tutorials/networking/http_request_class.rst index 38c40aa71..bfb04e8c4 100644 --- a/tutorials/networking/http_request_class.rst +++ b/tutorials/networking/http_request_class.rst @@ -26,7 +26,7 @@ Below is all the code we need to make it work. The URL points to an online API m .. tabs:: .. code-tab:: gdscript GDScript - + extends CanvasLayer func _ready(): @@ -38,9 +38,9 @@ Below is all the code we need to make it work. The URL points to an online API m func _on_request_completed(result, response_code, headers, body): var json = JSON.parse(body.get_string_from_utf8()) print(json.result) - + .. code-tab:: csharp - + class HTTPRequestDemo : CanvasLayer { public override void _Ready() @@ -48,13 +48,13 @@ Below is all the code we need to make it work. The URL points to an online API m GetNode("HTTPRequest").Connect("request_completed", this, "OnRequestCompleted"); GetNode("Button").Connect("pressed", this, "OnButtonPressed"); } - + public void OnButtonPressed() { HTTPRequest httpRequest = GetNode("HTTPRequest"); httpRequest.Request("http://www.mocky.io/v2/5185415ba171ea3a00704eed"); } - + public void OnRequestCompleted(int result, int response_code, string[] headers, byte[] body) { JSONParseResult json = JSON.Parse(Encoding.UTF8.GetString(body)); @@ -71,14 +71,14 @@ Note that you may want to check whether the ``result`` equals ``RESULT_SUCCESS`` Of course, you can also set custom HTTP headers. These are given as a string array, with each string containing a header in the format ``"header: value"``. For example, to set a custom user agent (the HTTP ``user-agent`` header) you could use the following: -.. tabs:: +.. tabs:: .. code-tab:: gdscript GDScript - + $HTTPRequest.request("http://www.mocky.io/v2/5185415ba171ea3a00704eed", ["user-agent: YourCustomUserAgent"]) - + .. code-tab:: csharp - + HTTPRequest httpRequest = GetNode("HTTPRequest"); httpRequest.Request("http://www.mocky.io/v2/5185415ba171ea3a00704eed", new string[] { "user-agent: YourCustomUserAgent" }); @@ -95,16 +95,16 @@ Until now, we have limited ourselves to requesting data from a server. But what .. tabs:: .. code-tab:: gdscript GDScript - + func _make_post_request(url, data_to_send, use_ssl): # Convert data to json string: var query = JSON.print(data_to_send) # Add 'Content-Type' header: var headers = ["Content-Type: application/json"] $HTTPRequest.request(url, headers, use_ssl, HTTPClient.METHOD_POST, query) - + .. code-tab:: csharp - + public void MakePostRequest(string url, object data_to_send, bool use_ssl) { string query = JSON.Print(data_to_send); diff --git a/tutorials/performance/gpu_optimization.rst b/tutorials/performance/gpu_optimization.rst index 67c914b08..f3be741e9 100644 --- a/tutorials/performance/gpu_optimization.rst +++ b/tutorials/performance/gpu_optimization.rst @@ -79,7 +79,7 @@ Reuse Shaders and Materials The Godot renderer is a little different to what is out there. It's designed to minimize GPU state changes as much as possible. :ref:`StandardMaterial3D ` does a good job at reusing materials that need similar -shaders. if custom shaders are used, make sure to reuse them as much as +shaders. If custom shaders are used, make sure to reuse them as much as possible. Godot's priorities are: - **Reusing Materials:** The fewer different materials in the diff --git a/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst b/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst index 755fef5b3..f0d4c3a67 100644 --- a/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst +++ b/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst @@ -115,7 +115,7 @@ the wave making it look like a wave is moving along the fish. .. image:: img/wave.gif The last motion is the twist, which is a panning roll along the spine. Similarly to the pivot, -we first construct a rotation matrix. +we first construct a rotation matrix. .. code-block:: glsl @@ -141,7 +141,7 @@ If we apply all these motions one after another, we get a fluid jelly-like motio Normal fish swim mostly with the back half of their body. Accordingly, we need to limit the panning motions to the back half of the fish. To do this, we create a new variable, ``mask``. -``mask`` is a float that goes from ``0`` at the front of the fish to ``1`` at the end using +``mask`` is a float that goes from ``0`` at the front of the fish to ``1`` at the end using ``smoothstep`` to control the point at which the transition from ``0`` to ``1`` happens. .. code-block:: glsl @@ -229,7 +229,7 @@ MultiMeshInstance. .. note:: If performance is an issue for you, try running the scene with GLES2 or with fewer fish. -Notice how all the fish are all in the same position in their swim cycle? It makes them look very +Notice how all the fish are all in the same position in their swim cycle? It makes them look very robotic. The next step is to give each fish a different position in the swim cycle so the entire school looks more organic. diff --git a/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst b/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst index f762854a7..44de676bd 100644 --- a/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst +++ b/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst @@ -49,7 +49,7 @@ Then add the following two functions: } These functions come from the default :ref:`ParticlesMaterial `. -They are used to generate a random number from each particle's ``RANDOM_SEED``. +They are used to generate a random number from each particle's ``RANDOM_SEED``. A unique thing about particle shaders is that some built-in variables are saved across frames. ``TRANSFORM``, ``COLOR``, and ``CUSTOM`` can all be accessed in the Spatial shader of the mesh, and diff --git a/tutorials/physics/physics_introduction.rst b/tutorials/physics/physics_introduction.rst index 300feb199..475a38e93 100644 --- a/tutorials/physics/physics_introduction.rst +++ b/tutorials/physics/physics_introduction.rst @@ -221,7 +221,7 @@ to it and the physics engine calculates the resulting movement, including collisions with other bodies, and collision responses, such as bouncing, rotating, etc. -You can modify a rigid body's behavior via properties such as "Mass", +You can modify a rigid body's behavior via properties such as "Mass", "Friction", or "Bounce", which can be set in the Inspector. The body's behavior is also affected by the world's properties, as set in diff --git a/tutorials/platform/android/android_plugin.rst b/tutorials/platform/android/android_plugin.rst index ccc8330b3..72c5fa110 100644 --- a/tutorials/platform/android/android_plugin.rst +++ b/tutorials/platform/android/android_plugin.rst @@ -12,22 +12,22 @@ by tapping into the functionality provided by the Android platform and ecosystem Mobile gaming monetization is one such example since it requires features and capabilities that don't belong to the core feature set of a game engine: -- Analytics -- In-app purchases -- Receipt validation -- Install tracking -- Ads -- Video ads -- Cross-promotion -- In-game soft & hard currencies -- Promo codes -- A/B testing -- Login -- Cloud saves -- Leaderboards and scores -- User support & feedback -- Posting to Facebook, Twitter, etc. -- Push notifications +- Analytics +- In-app purchases +- Receipt validation +- Install tracking +- Ads +- Video ads +- Cross-promotion +- In-game soft & hard currencies +- Promo codes +- A/B testing +- Login +- Cloud saves +- Leaderboards and scores +- User support & feedback +- Posting to Facebook, Twitter, etc. +- Push notifications Android plugin -------------- @@ -41,9 +41,8 @@ As a prerequisite, make sure you understand how to set up a :ref:`custom build e At its core, a Godot Android plugin is a `Android archive library `_ (*aar* archive file) with the following caveats: -- The library must have a dependency on the Godot engine library (``godot-lib...aar``). A stable version is made available for each Godot release on the `Godot download page `_. - -- The library must include a specifically configured ```` tag in its manifest file. +- The library must have a dependency on the Godot engine library (``godot-lib...aar``). A stable version is made available for each Godot release on the `Godot download page `_. +- The library must include a specifically configured ```` tag in its manifest file. Building an Android plugin ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -51,83 +50,71 @@ Building an Android plugin **Prerequisite:** `Android Studio `_ is strongly recommended as the IDE to use to create Android plugins. The instructions below assumes that you're using Android Studio. -1. Follow `these instructions `__ to create an Android library module for your plugin. +1. Follow `these instructions `__ to create an Android library module for your plugin. -2. Add the Godot engine library as a dependency to your plugin module: +2. Add the Godot engine library as a dependency to your plugin module: - - Download the Godot engine library (``godot-lib...aar``) from the `Godot download page `_ (e.g: ``godot-lib.4.0.stable.aar``). + - Download the Godot engine library (``godot-lib...aar``) from the `Godot download page `_ (e.g: ``godot-lib.4.0.stable.aar``). + - Follow `these instructions `__ to add + the Godot engine library as a dependency for your plugin. + - In the plugin module's ``build.gradle`` file, replace ``implementation`` with ``compileOnly`` for the dependency line for the Godot engine library. - - Follow `these instructions `__ to add - the Godot engine library as a dependency for your plugin. +3. Create a new class in the plugin module and make sure it extends ``org.godotengine.godot.plugin.GodotPlugin``. + At runtime, it will be used to instantiate a singleton object that will be used by the Godot engine to load, initialize and run the plugin. - - In the plugin module's ``build.gradle`` file, replace ``implementation`` with ``compileOnly`` for the dependency line for the Godot engine library. +4. Update the plugin ``AndroidManifest.xml`` file: -3. Create a new class in the plugin module and make sure it extends ``org.godotengine.godot.plugin.GodotPlugin``. - At runtime, it will be used to instantiate a singleton object that will be used by the Godot engine to load, initialize and run the plugin. + - Open the plugin ``AndroidManifest.xml`` file. + - Add the ```` tag if it's missing. + - In the ```` tag, add a ```` tag setup as follow:: -4. Update the plugin ``AndroidManifest.xml`` file: + - - Open the plugin ``AndroidManifest.xml`` file. + Where ``PluginName`` is the name of the plugin, and ``plugin.init.ClassFullName`` is the full name (package + class name) of the plugin loading class. - - Add the ```` tag if it's missing. +5. Add the remaining logic for your plugin and run the ``gradlew build`` command to generate the plugin's ``aar`` file. + The build will likely generate both a ``debug`` and ``release`` ``aar`` files. + Depending on your need, pick only one version (usually the ``release`` one) which to provide your users with. - - In the ```` tag, add a ```` tag setup as follow:: + It's recommended that the ``aar`` filename matches the following pattern: ``[PluginName]*.aar`` where ``PluginName`` is the name of the plugin in PascalCase (e.g.: ``GodotPayment.release.aar``). - +6. Create a Godot Android Plugin configuration file to help the system detect and load your plugin: - Where ``PluginName`` is the name of the plugin, and ``plugin.init.ClassFullName`` is the full name (package + class name) of the plugin loading class. + - The configuration file extension must be ``gdap`` (e.g.: ``MyPlugin.gdap``). + - The configuration file format is as follow:: -5. Add the remaining logic for your plugin and run the ``gradlew build`` command to generate the plugin's ``aar`` file. - The build will likely generate both a ``debug`` and ``release`` ``aar`` files. - Depending on your need, pick only one version (usually the ``release`` one) which to provide your users with. + [config] - It's recommended that the ``aar`` filename matches the following pattern: ``[PluginName]*.aar`` where ``PluginName`` is the name of the plugin in PascalCase (e.g.: ``GodotPayment.release.aar``). + name="MyPlugin" + binary_type="local" + binary="MyPlugin.aar" -6. Create a Godot Android Plugin configuration file to help the system detect and load your plugin: + [dependencies] - - The configuration file extension must be ``gdap`` (e.g.: ``MyPlugin.gdap``). - - - The configuration file format is as follow:: - - [config] - - name="MyPlugin" - binary_type="local" - binary="MyPlugin.aar" - - [dependencies] - - local=["local_dep1.aar", "local_dep2.aar"] - remote=["example.plugin.android:remote-dep1:0.0.1", "example.plugin.android:remote-dep2:0.0.1"] - custom_maven_repos=["http://repo.mycompany.com/maven2"] - - The ``config`` section and fields are required and defined as follow: - - - **name**: name of the plugin + local=["local_dep1.aar", "local_dep2.aar"] + remote=["example.plugin.android:remote-dep1:0.0.1", "example.plugin.android:remote-dep2:0.0.1"] + custom_maven_repos=["http://repo.mycompany.com/maven2"] - - **binary_type**: can be either ``local`` or ``remote``. The type affects the **binary** field + The ``config`` section and fields are required and defined as follow: - - **binary**: - - - if **binary_type** is ``local``, then this should be the filepath of the plugin ``aar`` file. - - - The filepath can be relative (e.g.: ``MyPlugin.aar``) in which case it's relative to the ``res://android/plugins`` directory. + - **name**: name of the plugin. + - **binary_type**: can be either ``local`` or ``remote``. The type affects the **binary** field. + - **binary**: - - The filepath can be absolute: ``res://some_path/MyPlugin.aar``. - - - if **binary_type** is ``remote``, then this should be a declaration for a `remote gradle binary `_ (e.g.: ``org.godot.example:my-plugin:0.0.0``). - - The ``dependencies`` section and fields are optional and defined as follow: - - - **local**: contains a list of filepaths to the local ``.aar`` binary files the plugin depends on. Similarly to the ``binary`` field (when the ``binary_type`` is ``local``), the local binaries' filepaths can be relative or absolute. + - If **binary_type** is ``local``, then this should be the filepath of the plugin ``aar`` file. - - **remote**: contains a list of remote binary gradle dependencies for the plugin. + - The filepath can be relative (e.g.: ``MyPlugin.aar``) in which case it's relative to the ``res://android/plugins`` directory. + - The filepath can be absolute: ``res://some_path/MyPlugin.aar``. - - **custom_maven_repos**: contains a list of URLs specifying the custom maven repositories required for the plugin's dependencies - + - If **binary_type** is ``remote``, then this should be a declaration for a `remote gradle binary `_ (e.g.: ``org.godot.example:my-plugin:0.0.0``). + The ``dependencies`` section and fields are optional and defined as follow: + + - **local**: contains a list of filepaths to the local ``.aar`` binary files the plugin depends on. Similarly to the ``binary`` field (when the ``binary_type`` is ``local``), the local binaries' filepaths can be relative or absolute. + - **remote**: contains a list of remote binary gradle dependencies for the plugin. + - **custom_maven_repos**: contains a list of URLs specifying the custom maven repositories required for the plugin's dependencies. Loading and using an Android plugin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -152,10 +139,9 @@ Bundling GDNative resources An Android plugin can define and provide C/C++ GDNative resources, either to provide and/or access functionality from the game logic. The GDNative resources can be bundled within the plugin ``aar`` file which simplifies the distribution and deployment process: - - The shared libraries (``.so``) for the defined GDNative libraries will be automatically bundled by the ``aar`` build system. - - - Godot ``*.gdnlib`` and ``*.gdns`` resource files must be manually defined in the plugin ``assets`` directory. - The recommended path for these resources relative to the ``assets`` directory should be: ``godot/plugin/v1/[PluginName]/``. +- The shared libraries (``.so``) for the defined GDNative libraries will be automatically bundled by the ``aar`` build system. +- Godot ``*.gdnlib`` and ``*.gdns`` resource files must be manually defined in the plugin ``assets`` directory. + The recommended path for these resources relative to the ``assets`` directory should be: ``godot/plugin/v1/[PluginName]/``. For GDNative libraries, the plugin singleton object must override the ``org.godotengine.godot.plugin.GodotPlugin::getPluginGDNativeLibrariesPaths()`` method, and return the paths to the bundled GDNative libraries config files (``*.gdnlib``). The paths must be relative to the ``assets`` directory. @@ -164,11 +150,9 @@ At runtime, the plugin will provide these paths to Godot core which will use the Reference implementations ^^^^^^^^^^^^^^^^^^^^^^^^^ -- `Godot Oculus Mobile plugin `_ - - - `Bundled gdnative resources `_ - -- `Godot Google Play Billing plugin `_ +- `Godot Oculus Mobile plugin `_ + - `Bundled gdnative resources `_ +- `Godot Google Play Billing plugin `_ Troubleshooting @@ -179,6 +163,5 @@ Godot crashes upon load Check ``adb logcat`` for possible problems, then: -- Check that the methods exposed by the plugin used the following Java types: ``void``, ``boolean``, ``int``, ``float``, ``java.lang.String``, ``org.godotengine.godot.Dictionary``, ``int[]``, ``byte[]``, ``float[]``, ``java.lang.String[]``. - - - More complex datatypes are not supported for now. +- Check that the methods exposed by the plugin used the following Java types: ``void``, ``boolean``, ``int``, ``float``, ``java.lang.String``, ``org.godotengine.godot.Dictionary``, ``int[]``, ``byte[]``, ``float[]``, ``java.lang.String[]``. +- More complex datatypes are not supported for now. diff --git a/tutorials/platform/ios/ios_plugin.rst b/tutorials/platform/ios/ios_plugin.rst index 679e36215..2f2fa95b2 100644 --- a/tutorials/platform/ios/ios_plugin.rst +++ b/tutorials/platform/ios/ios_plugin.rst @@ -62,7 +62,7 @@ To build an iOS plugin: 5. The iOS plugin system also supports ``.xcframework`` files. To generate one, you can use a command such as: ``xcodebuild -create-xcframework -library [DeviceLibrary].a -library [SimulatorLibrary].a -output [PluginName].xcframework``. -6. Create a Godot iOS Plugin configuration file to help the system detect and load your plugin: +6. Create a Godot iOS Plugin configuration file to help the system detect and load your plugin: - The configuration file extension must be ``gdip`` (e.g.: ``MyPlugin.gdip``). diff --git a/tutorials/plugins/editor/making_plugins.rst b/tutorials/plugins/editor/making_plugins.rst index 1cfbf7ec2..c002b12e6 100644 --- a/tutorials/plugins/editor/making_plugins.rst +++ b/tutorials/plugins/editor/making_plugins.rst @@ -73,8 +73,9 @@ change: it must be a ``tool`` script, or else it will not load properly in the editor, and it must inherit from :ref:`class_EditorPlugin`. .. warning:: + In addition to the EditorPlugin script, any other GDScript that your plugin uses - must *also* be a tool. Any GDScript without ``tool`` imported into the editor + must *also* be a tool. Any GDScript without ``tool`` imported into the editor will act like an empty file! It's important to deal with initialization and clean-up of resources. diff --git a/tutorials/rendering/gles2_gles3_differences.rst b/tutorials/rendering/gles2_gles3_differences.rst index 5a79eb648..82d80470f 100644 --- a/tutorials/rendering/gles2_gles3_differences.rst +++ b/tutorials/rendering/gles2_gles3_differences.rst @@ -37,7 +37,7 @@ Color space ----------- GLES2 and GLES3 are in different color spaces. This means that colors will appear slightly -different between them especially when lighting is used. +different between them especially when lighting is used. If your game is going to use both GLES2 and GLES3, you can use an ``if`` statement check and see if the output is in sRGB, using ``OUTPUT_IS_SRGB``. ``OUTPUT_IS_SRGB`` is diff --git a/tutorials/scripting/gdscript/gdscript_basics.rst b/tutorials/scripting/gdscript/gdscript_basics.rst index 7dc6e945a..6aa121a6a 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.rst +++ b/tutorials/scripting/gdscript/gdscript_basics.rst @@ -1364,7 +1364,7 @@ There are a few things to keep in mind here: in to ``Idle.gd``. 4. If ``Idle.gd``'s ``_init`` constructor takes 0 arguments, it still needs to pass some value to the ``State.gd`` base class, even if it does nothing. This brings us to the fact that you - can pass expressions to the base constructor as well, not just variables. eg.:: + can pass expressions to the base constructor as well, not just variables, e.g.:: # Idle.gd diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index 84f1d1b61..547b17e88 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -208,7 +208,7 @@ these properties, and if you don't write to them, Godot will optimize away the c +-------------------------------------------+--------------------------------------------------------------------------------------------------+ | in vec2 **VIEWPORT_SIZE** | Size of viewport (in pixels). | +-------------------------------------------+--------------------------------------------------------------------------------------------------+ -| in vec4 **FRAGCOORD** | Coordinate of pixel center in screen space. ``xy`` specifies position in window, ``z`` | +| in vec4 **FRAGCOORD** | Coordinate of pixel center in screen space. ``xy`` specifies position in window, ``z`` | | | specifies fragment depth if ``DEPTH`` is not used. Origin is lower-left. | +-------------------------------------------+--------------------------------------------------------------------------------------------------+ | in bool **FRONT_FACING** | ``true`` if current face if front face. | diff --git a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst index 8644ec298..1968b529f 100644 --- a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst +++ b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst @@ -259,7 +259,7 @@ use it to set the height value instead of arbitrarily multiplying by ``0.5``. VERTEX.y += height * height_scale; -Now it looks much better. +Now it looks much better. .. image:: img/noise-low.png diff --git a/tutorials/vr/developing_for_oculus_quest.rst b/tutorials/vr/developing_for_oculus_quest.rst index fca4c8bb1..4d765d1ce 100644 --- a/tutorials/vr/developing_for_oculus_quest.rst +++ b/tutorials/vr/developing_for_oculus_quest.rst @@ -81,7 +81,7 @@ is the scene we run. Godot does not ask you to set this on export. .. image:: img/quest_project_settings.png -Then go into the export menu and configure a new Android export. if +Then go into the export menu and configure a new Android export. If you still haven't gone through the :ref:`doc_exporting_for_android` page do it now. If you didn't you'll have some red messages on this screen. diff --git a/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_one.rst b/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_one.rst index 457d5e00a..ee6d52693 100644 --- a/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_one.rst +++ b/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_one.rst @@ -770,7 +770,7 @@ teleport, it will make the ``teleport_mesh`` visible so the user knows where the _________________ If ``held_object`` is not equal to ``null``, then the VR controller is holding something. We then check to see if the object that is being held, ``held_object``, extends -a class called ``VR_Interactable_Rigidbody``. we have not made ``VR_Interactable_Rigidbody`` yet, but ``VR_Interactable_Rigidbody`` will be a custom class we will use +a class called ``VR_Interactable_Rigidbody``. We have not made ``VR_Interactable_Rigidbody`` yet, but ``VR_Interactable_Rigidbody`` will be a custom class we will use on all of the special/custom :ref:`RigidBody `-based nodes in the project. .. tip:: Don't worry, we will cover ``VR_Interactable_Rigidbody`` after this section! diff --git a/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_two.rst b/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_two.rst index 751e58eae..27efbe020 100644 --- a/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_two.rst +++ b/tutorials/vr/vr_starter_tutorial/vr_starter_tutorial_part_two.rst @@ -848,7 +848,7 @@ that the functions defined defined in ``VR_Interactable_Rigidbody`` can be calle Next, let's look at the class variables: -* ``SWORD_DAMAGE``: A constant to define the amount of damage the sword does. This damage is applied to every object in the sword on every ``_physics_process`` call +* ``SWORD_DAMAGE``: A constant to define the amount of damage the sword does. This damage is applied to every object in the sword on every ``_physics_process`` call * ``COLLISION_FORCE``: A constant that defines the amount of force applied to :ref:`RigidBody ` nodes when the sword collides with a :ref:`PhysicsBody `. * ``damage_body``: A variable to hold the :ref:`KinematicBody ` node used to detect whether the sword is stabbing a :ref:`PhysicsBody ` node or not. * ``sword_noise``: A variable to hold the :ref:`AudioStreamPlayer3D ` node used to play a sound when the sword collides with something.