mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Update references to private class methods across the docs
This commit is contained in:
@@ -100,7 +100,7 @@ Let's begin to code our plugin, one method at time:
|
||||
return "demos.sillymaterial"
|
||||
|
||||
The first method is the
|
||||
:ref:`_get_importer_name()<class_EditorImportPlugin_method__get_importer_name>`. This is a
|
||||
:ref:`_get_importer_name()<class_EditorImportPlugin_private_method__get_importer_name>`. This is a
|
||||
unique name for your plugin that is used by Godot to know which import was used
|
||||
in a certain file. When the files needs to be reimported, the editor will know
|
||||
which plugin to call.
|
||||
@@ -110,7 +110,7 @@ which plugin to call.
|
||||
func _get_visible_name():
|
||||
return "Silly Material"
|
||||
|
||||
The :ref:`_get_visible_name()<class_EditorImportPlugin_method__get_visible_name>` method is
|
||||
The :ref:`_get_visible_name()<class_EditorImportPlugin_private_method__get_visible_name>` method is
|
||||
responsible for returning the name of the type it imports and it will be shown to the
|
||||
user in the Import dock.
|
||||
|
||||
@@ -124,7 +124,7 @@ descriptive name for your plugin.
|
||||
return ["mtxt"]
|
||||
|
||||
Godot's import system detects file types by their extension. In the
|
||||
:ref:`_get_recognized_extensions()<class_EditorImportPlugin_method__get_recognized_extensions>`
|
||||
:ref:`_get_recognized_extensions()<class_EditorImportPlugin_private_method__get_recognized_extensions>`
|
||||
method you return an array of strings to represent each extension that this
|
||||
plugin can understand. If an extension is recognized by more than one plugin,
|
||||
the user can select which one to use when importing the files.
|
||||
@@ -198,7 +198,7 @@ plugin:
|
||||
func _get_preset_count():
|
||||
return Presets.size()
|
||||
|
||||
The :ref:`_get_preset_count() <class_EditorImportPlugin_method__get_preset_count>` method
|
||||
The :ref:`_get_preset_count() <class_EditorImportPlugin_private_method__get_preset_count>` method
|
||||
returns the amount of presets that this plugins defines. We only have one preset
|
||||
now, but we can make this method future-proof by returning the size of our
|
||||
``Presets`` enumeration.
|
||||
@@ -214,7 +214,7 @@ now, but we can make this method future-proof by returning the size of our
|
||||
|
||||
|
||||
Here we have the
|
||||
:ref:`_get_preset_name() <class_EditorImportPlugin_method__get_preset_name>` method, which
|
||||
:ref:`_get_preset_name() <class_EditorImportPlugin_private_method__get_preset_name>` method, which
|
||||
gives names to the presets as they will be presented to the user, so be sure to
|
||||
use short and clear names.
|
||||
|
||||
@@ -239,7 +239,7 @@ you do this you have to be careful when you add more presets.
|
||||
return []
|
||||
|
||||
This is the method which defines the available options.
|
||||
:ref:`_get_import_options() <class_EditorImportPlugin_method__get_import_options>` returns
|
||||
:ref:`_get_import_options() <class_EditorImportPlugin_private_method__get_import_options>` returns
|
||||
an array of dictionaries, and each dictionary contains a few keys that are
|
||||
checked to customize the option as its shown to the user. The following table
|
||||
shows the possible keys:
|
||||
@@ -277,7 +277,7 @@ of options first and then change it based on the preset.
|
||||
return true
|
||||
|
||||
For the
|
||||
:ref:`_get_option_visibility() <class_EditorImportPlugin_method__get_option_visibility>`
|
||||
:ref:`_get_option_visibility() <class_EditorImportPlugin_private_method__get_option_visibility>`
|
||||
method, we simply return ``true`` because all of our options (i.e. the single
|
||||
one we defined) are visible all the time.
|
||||
|
||||
@@ -288,7 +288,7 @@ The ``import`` method
|
||||
---------------------
|
||||
|
||||
The heavy part of the process, responsible for converting the files into
|
||||
resources, is covered by the :ref:`_import() <class_EditorImportPlugin_method__import>`
|
||||
resources, is covered by the :ref:`_import() <class_EditorImportPlugin_private_method__import>`
|
||||
method. Our sample code is a bit long, so let's split in a few parts:
|
||||
|
||||
::
|
||||
|
||||
Reference in New Issue
Block a user