mirror of https://github.com/godotengine/godot
Fix code examples for @tool annotation
This commit is contained in:
parent
6f5704d86f
commit
6eac901ecb
|
|
@ -9,7 +9,7 @@
|
||||||
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
|
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
tool
|
@tool
|
||||||
extends EditorImportPlugin
|
extends EditorImportPlugin
|
||||||
|
|
||||||
func _get_importer_name():
|
func _get_importer_name():
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
The [method _post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
|
The [method _post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
tool # Needed so it runs in editor.
|
@tool # Needed so it runs in editor.
|
||||||
extends EditorScenePostImport
|
extends EditorScenePostImport
|
||||||
# This sample changes all node names.
|
# This sample changes all node names.
|
||||||
# Called right after the scene is imported and gets the root node.
|
# Called right after the scene is imported and gets the root node.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
[b]Example script:[/b]
|
[b]Example script:[/b]
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
tool
|
@tool
|
||||||
extends EditorScript
|
extends EditorScript
|
||||||
|
|
||||||
func _run():
|
func _run():
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
Below shows an example of a custom parser that extracts strings from a CSV file to write into a POT.
|
Below shows an example of a custom parser that extracts strings from a CSV file to write into a POT.
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
tool
|
@tool
|
||||||
extends EditorTranslationParserPlugin
|
extends EditorTranslationParserPlugin
|
||||||
|
|
||||||
func _parse_file(path, msgids, msgids_context_plural):
|
func _parse_file(path, msgids, msgids_context_plural):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue