mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Merge pull request #10370 from tetrapod00/standardize-header-the-rest
Standardize RST header syntax
This commit is contained in:
@@ -10,7 +10,7 @@ Usage
|
||||
-----
|
||||
|
||||
Getting started
|
||||
***************
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Make sure you have enabled and successfully set up :ref:`Android Gradle Builds <doc_android_gradle_build>`.
|
||||
Follow the compiling instructions on the ``GodotGooglePlayBilling`` `github page <https://github.com/godotengine/godot-google-play-billing>`__.
|
||||
@@ -21,7 +21,7 @@ The plugin should now show up in the Android export settings, where you can enab
|
||||
|
||||
|
||||
Initialize the plugin
|
||||
*********************
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To use the ``GodotGooglePlayBilling`` API:
|
||||
|
||||
@@ -79,7 +79,7 @@ Return values for ``getConnectionState()``:
|
||||
|
||||
|
||||
Query available items
|
||||
*********************
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Once the API has connected, query SKUs using ``querySkuDetails()``. You must successfully complete
|
||||
an SKU query before calling the ``purchase()`` or ``queryPurchases()`` functions,
|
||||
@@ -106,7 +106,7 @@ Example use of ``querySkuDetails()``:
|
||||
|
||||
|
||||
Query user purchases
|
||||
********************
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To retrieve a user's purchases, call the ``queryPurchases()`` function passing
|
||||
a string with the type of SKU to query. The SKU type string should be
|
||||
@@ -153,7 +153,7 @@ For more information on processing the purchase items returned by
|
||||
|
||||
|
||||
Purchase an item
|
||||
****************
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
To initiate the purchase flow for an item, call ``purchase()`` passing the
|
||||
product id string of the SKU you wish to purchase.
|
||||
@@ -181,7 +181,7 @@ The payment flow will send a ``purchases_updated`` signal on success or a
|
||||
|
||||
|
||||
Processing a purchase item
|
||||
**************************
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The ``query_purchases_response`` and ``purchases_updated`` signals provide an array
|
||||
of purchases in :ref:`Dictionary <class_Dictionary>` format. The purchase Dictionary
|
||||
@@ -210,7 +210,7 @@ Purchase fields:
|
||||
|
||||
|
||||
Check purchase state
|
||||
********************
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Check the ``purchase_state`` value of a purchase to determine if a
|
||||
purchase was completed or is still pending.
|
||||
@@ -237,7 +237,7 @@ in the Google Play Billing Library documentation.
|
||||
|
||||
|
||||
Consumables
|
||||
***********
|
||||
~~~~~~~~~~~
|
||||
|
||||
If your in-app item is not a one-time purchase but a consumable item (e.g. coins) which can be purchased
|
||||
multiple times, you can consume an item by calling ``consumePurchase()`` passing
|
||||
@@ -271,7 +271,7 @@ Example use of ``consumePurchase()``:
|
||||
|
||||
|
||||
Acknowledging purchases
|
||||
***********************
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If your in-app item is a one-time purchase, you must acknowledge the purchase by
|
||||
calling the ``acknowledgePurchase()`` function, passing the ``purchase_token``
|
||||
@@ -307,7 +307,7 @@ Example use of ``acknowledgePurchase()``:
|
||||
|
||||
|
||||
Subscriptions
|
||||
*************
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Subscriptions work mostly like regular in-app items. Use ``"subs"`` as the second
|
||||
argument to ``querySkuDetails()`` to get subscription details. Pass ``"subs"``
|
||||
|
||||
@@ -72,7 +72,7 @@ Below we break-down the steps used to create the GLTF Viewer app.
|
||||
- By declaring that the Activity will handle these configuration events using the `android:configChanges attribute <https://developer.android.com/guide/topics/manifest/activity-element#config>`_.
|
||||
|
||||
1. Create the Android app
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -167,7 +167,7 @@ Below we break-down the steps used to create the GLTF Viewer app.
|
||||
|
||||
|
||||
2. Create the Godot project
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -228,7 +228,7 @@ Below we break-down the steps used to create the GLTF Viewer app.
|
||||
|
||||
|
||||
3. Build and run the app
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Once you complete configuration of your Godot project, build and run the Android app.
|
||||
If set up correctly, the host Activity will initialize the embedded Godot Engine on startup.
|
||||
|
||||
@@ -22,7 +22,7 @@ Starting in Godot 4.2, Android plugins built on the v1 architecture are now depr
|
||||
Instead, Godot 4.2 introduces a new **Version 2 (v2)** architecture for Android plugins.
|
||||
|
||||
v2 Architecture
|
||||
^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -49,7 +49,7 @@ which is provided by the :ref:`Godot Android library <doc_android_library>`.
|
||||
The ``GodotPlugin`` class provides APIs to access the running Godot instance and hook into its lifecycle. It is loaded at runtime by the Godot engine.
|
||||
|
||||
v2 Packaging format
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
v1 Android plugins required a custom ``gdap`` configuration file that was used by the Godot Editor to detect and load them.
|
||||
However this approach had several drawbacks, primary ones being that it lacked flexibility and departed from the `existing
|
||||
@@ -106,7 +106,7 @@ To provide further understanding, here is a break-down of the steps used to crea
|
||||
|
||||
|
||||
Building a v2 Android plugin with GDExtension capabilities
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Similar to GDNative support in v1 Android plugins, v2 Android plugins support the ability to integrate GDExtension capabilities.
|
||||
|
||||
@@ -117,7 +117,7 @@ to set up your own Godot Android plugin project.
|
||||
|
||||
|
||||
Migrating a v1 Android plugin to v2
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use the following steps if you have a v1 Android plugin you want to migrate to v2:
|
||||
|
||||
@@ -229,7 +229,7 @@ At build time, the contents of the ``export_scripts_template`` directory as well
|
||||
|
||||
|
||||
Packaging a v2 Android plugin with GDExtension capabilities
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For GDExtension, we follow the same steps as for `Packaging a v2 Android plugin`_ and add the `GDExtension config file <https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html#using-the-gdextension-module>`_ in
|
||||
the same location as ``plugin.cfg``.
|
||||
@@ -308,7 +308,7 @@ Using a v2 Android plugin
|
||||
|
||||
|
||||
Using a v2 Android plugin as an Android library
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Since they are also Android libraries, Godot v2 Android plugins can be stripped from their ``EditorExportPlugin`` packaging and provided as raw ``AAR`` binaries for use as libraries alongside the :ref:`Godot Android library <doc_android_library>` by Android apps.
|
||||
|
||||
@@ -327,7 +327,7 @@ Tips and Guidelines
|
||||
-------------------
|
||||
|
||||
Simplify access to the exposed Java / Kotlin APIs
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To make it easier to access the exposed Java / Kotlin APIs in the Godot Editor, it's recommended to
|
||||
provide one (or multiple) gdscript wrapper class(es) for your plugin users to interface with.
|
||||
@@ -355,7 +355,7 @@ For example::
|
||||
printerr("Initialization error")
|
||||
|
||||
Support using the GDExtension functionality in the Godot Editor
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If planning to use the GDExtension functionality in the Godot Editor, it is recommended that the
|
||||
GDExtension's native binaries are compiled not just for Android, but also for the OS onto which
|
||||
@@ -367,7 +367,7 @@ editor. You can use the `godot-cpp-template <https://github.com/godotengine/godo
|
||||
github template for reference on how to do so.
|
||||
|
||||
Godot crashes upon load
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. UPDATE: Not supported yet. When more complex datatypes are supported,
|
||||
.. update this section.
|
||||
|
||||
@@ -19,7 +19,7 @@ settings, this is already part of the exported HTML page. To understand practica
|
||||
see :ref:`Custom HTML page for Web export <doc_customizing_html5_shell>`.
|
||||
|
||||
Static Methods
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
+---------+-----------------------------------------------------------------------------------------------+
|
||||
| Promise | :js:attr:`load <Engine.load>` **(** string basePath **)** |
|
||||
@@ -30,7 +30,7 @@ Static Methods
|
||||
+---------+-----------------------------------------------------------------------------------------------+
|
||||
|
||||
Instance Methods
|
||||
^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
+---------+---------------------------------------------------------------------------------------------------------------+
|
||||
| Promise | :js:attr:`init <Engine.prototype.init>` **(** *[ string basePath ]* **)** |
|
||||
@@ -183,7 +183,7 @@ An object used to configure the Engine instance based on godot export options, a
|
||||
templates if needed.
|
||||
|
||||
Properties
|
||||
^^^^^^^^^^
|
||||
~~~~~~~~~~
|
||||
|
||||
+-------------------+-------------------------------+
|
||||
| type | name |
|
||||
|
||||
Reference in New Issue
Block a user