Files
godot-docs-l10n/classes/es/class_gdnativelibrary.rst
Rémi Verschelde cf78697eea Add localized class reference as pre-generated RST files
Currently including `zh_CN` and `es` which both have very high completion
ratios. Others will be added once they reach a significant percentage too.

These RST files will be used by godot-docs in place of its `classes` folder
after we sync with https://github.com/godotengine/godot-docs/pull/5458.

The update workflow is manual for now (example for `zh_CN`):

- Build `godotengine/godot` in the branch we currently track (now `3.x`)
- Run `godot --doctool -l zh_CN`
- Run `cd doc && make rst LANGARG=zh_CN`
- Copy `doc/_build/rst/*` to `classes/zh_CN/` here
- Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
2021-12-21 16:07:55 +01:00

159 lines
7.6 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the GDNativeLibrary.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_GDNativeLibrary:
GDNativeLibrary
===============
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
Una biblioteca externa que contiene funciones o clases de script para usar en Godot.
Descripción
----------------------
A GDNative library can implement :ref:`NativeScript<class_NativeScript>`\ s, global functions to call with the :ref:`GDNative<class_GDNative>` class, or low-level engine extensions through interfaces such as :ref:`ARVRInterfaceGDNative<class_ARVRInterfaceGDNative>`. The library must be compiled for each platform and architecture that the project will run on.
Tutoriales
--------------------
- :doc:`../tutorials/plugins/gdnative/gdnative-c-example`
- :doc:`../tutorials/plugins/gdnative/gdnative-cpp-example`
Propiedades
----------------------
+-------------------------------------+--------------------------------------------------------------------+--------------+
| :ref:`ConfigFile<class_ConfigFile>` | :ref:`config_file<class_GDNativeLibrary_property_config_file>` | |
+-------------------------------------+--------------------------------------------------------------------+--------------+
| :ref:`bool<class_bool>` | :ref:`load_once<class_GDNativeLibrary_property_load_once>` | ``true`` |
+-------------------------------------+--------------------------------------------------------------------+--------------+
| :ref:`bool<class_bool>` | :ref:`reloadable<class_GDNativeLibrary_property_reloadable>` | ``true`` |
+-------------------------------------+--------------------------------------------------------------------+--------------+
| :ref:`bool<class_bool>` | :ref:`singleton<class_GDNativeLibrary_property_singleton>` | ``false`` |
+-------------------------------------+--------------------------------------------------------------------+--------------+
| :ref:`String<class_String>` | :ref:`symbol_prefix<class_GDNativeLibrary_property_symbol_prefix>` | ``"godot_"`` |
+-------------------------------------+--------------------------------------------------------------------+--------------+
Métodos
--------------
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------+
| :ref:`PoolStringArray<class_PoolStringArray>` | :ref:`get_current_dependencies<class_GDNativeLibrary_method_get_current_dependencies>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_current_library_path<class_GDNativeLibrary_method_get_current_library_path>` **(** **)** |const| |
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------+
Descripciones de Propiedades
--------------------------------------------------------
.. _class_GDNativeLibrary_property_config_file:
- :ref:`ConfigFile<class_ConfigFile>` **config_file**
+----------+------------------------+
| *Setter* | set_config_file(value) |
+----------+------------------------+
| *Getter* | get_config_file() |
+----------+------------------------+
Este recurso en formato :ref:`ConfigFile<class_ConfigFile>` de tipo INI, como en los archivos ``.gdnlib``.
----
.. _class_GDNativeLibrary_property_load_once:
- :ref:`bool<class_bool>` **load_once**
+-----------+----------------------+
| *Default* | ``true`` |
+-----------+----------------------+
| *Setter* | set_load_once(value) |
+-----------+----------------------+
| *Getter* | should_load_once() |
+-----------+----------------------+
Si ``true``, Godot carga sólo una copia de la biblioteca y cada script que hace referencia a la biblioteca compartirá datos estáticos como variables estáticas o globales.
Si ``false``, Godot carga una copia separada de la biblioteca en la memoria para cada script que hace referencia a ella.
----
.. _class_GDNativeLibrary_property_reloadable:
- :ref:`bool<class_bool>` **reloadable**
+-----------+-----------------------+
| *Default* | ``true`` |
+-----------+-----------------------+
| *Setter* | set_reloadable(value) |
+-----------+-----------------------+
| *Getter* | is_reloadable() |
+-----------+-----------------------+
Si ``true``, el editor descargará temporalmente la biblioteca cada vez que el usuario se aleje de la ventana del editor, permitiendo al usuario recompilar la biblioteca sin reiniciar Godot.
\ **Nota:** Si la biblioteca define los scripts de herramientas que se ejecutan dentro del editor, ``recargable`` debe ser ``false``. En caso contrario, el editor intentará descargar los scripts de la herramienta mientras están en uso y se bloqueará.
----
.. _class_GDNativeLibrary_property_singleton:
- :ref:`bool<class_bool>` **singleton**
+-----------+----------------------+
| *Default* | ``false`` |
+-----------+----------------------+
| *Setter* | set_singleton(value) |
+-----------+----------------------+
| *Getter* | is_singleton() |
+-----------+----------------------+
Si ``true``, Godot carga la biblioteca al inicio en lugar de la primera vez que un script utiliza la biblioteca, llamando a ``{prefix}gdnative_singleton`` después de inicializar la biblioteca (donde ``{prefix}`` es el valor de :ref:`symbol_prefix<class_GDNativeLibrary_property_symbol_prefix>`). La biblioteca permanece cargada mientras Godot esté en funcionamiento.
\ **Nota:** Una biblioteca de un solo botón no puede ser :ref:`reloadable<class_GDNativeLibrary_property_reloadable>`.
----
.. _class_GDNativeLibrary_property_symbol_prefix:
- :ref:`String<class_String>` **symbol_prefix**
+-----------+--------------------------+
| *Default* | ``"godot_"`` |
+-----------+--------------------------+
| *Setter* | set_symbol_prefix(value) |
+-----------+--------------------------+
| *Getter* | get_symbol_prefix() |
+-----------+--------------------------+
El prefijo con el que empiezan las funciones del punto de entrada de esta biblioteca. Por ejemplo, una GDNativeLibrary declararía su función ``gdnative_init`` como ``godot_gdnative_init`` por defecto.
En las plataformas que requieren bibliotecas de enlace estático (actualmente sólo iOS), cada biblioteca debe tener un ``symbol_prefix`` diferente.
Descripciones de Métodos
------------------------------------------------
.. _class_GDNativeLibrary_method_get_current_dependencies:
- :ref:`PoolStringArray<class_PoolStringArray>` **get_current_dependencies** **(** **)** |const|
Devuelve los caminos a todas las bibliotecas de dependencia para la plataforma y la arquitectura actuales.
----
.. _class_GDNativeLibrary_method_get_current_library_path:
- :ref:`String<class_String>` **get_current_library_path** **(** **)** |const|
Devuelve la ruta del archivo de la biblioteca dinámica para la plataforma y la arquitectura actuales.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`