* 🐞 fix(plugins): fix syntax errors
Correct the syntax errors in the plugin development section, specifically by modifying 'EditorInterface' to 'EditorInterface.Singleton' in the C# portion. It is imperative to utilize the singleton pattern here to ensure the plugin successfully compiles.
* 🐞 fix(different): ADD exceptions
Provide explanations for Singleton exceptions of `EditorInterface`
- Add screenshots
- Document reading and writing settings
- Document manually editing project.godot
- Note that most settings are changed in different
classes at runtime
This allows users to leave comments on pages that don't have
`:allow_comments: False` somewhere in the page's source.
Both manual and class reference pages can receive comments.
Index pages cannot have comments, as discussion should occur on "leaf" pages.
GitHub Discussions is used as a backend on the same repository. This means
that Discussions *must* be enabled on godotengine/godot-docs before this
commit is merged to `master`. Users can choose to use the "Custom" watch
mode if they don't want to get notifications for discussion updates,
but still get notifications for issue and pull request updates.
User comments are intended to be used for the following purposes:
- Add a clarification or correct something in the documentation,
without having to open a pull request. Contributors are encouraged to
take a look at discussions from time to time, and see if there's information
worth incorporating in the pages themselves. Don't forget to reply to
the comment when doing so :)
- Mention a workaround for a common issue.
- Link to useful third-party resources that are relevant to the current page,
such as tutorials or add-ons.
User comments should *not* be used for technical support. Other community
platforms should be used for that.
Page-to-discussion matching is done using the `pagename` Sphinx variable,
which is independent of the Godot version and documentation language.
Being independent of the Godot version allows keeping old comments
when the Godot version changes, while also allowing users from `/stable`
and `/4.1` to "see" each other in discussions.
See https://giscus.app for more information.
Godot 4.0 added a new parameter to EditorInspectorPlugin._parse_property. This was updated in the C# version of the tutorial, but not the gdscript version
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
- Rename members that have been renamed in Godot's C# API for 4.0.
- Change `delta` parameter type to `double`.
- Ensure parameters match base declaration.
- Follow our code style more closely.
- Other minor code fixes.
The sample code listed the function ``get_import_options`` when it most likely meant ``_get_import_options`` (with an underscore in front). Some of the sample code also used the outdated File API instead of the FileAccess API.
Corrected more function names. Updated parameters for _get_import_options and _get_preset_name in sample code.
* Fixed C# EditorInspectorPlugin _CanHandle parameter type
Updated Inspector Plugin tutorial to reflect that C#'s
EditorInspectorPlugin::_CanHandle() takes a GodotObject, not a
Variant.
* Eliminated horizontal scroll in C# for inspector-plugin tutorial
Put a line-break and indentation to avoid horizontal scrolling in
the displayed code.
* Fixed _ParseProperty() method signature and undeclared variable
Changed example code for EditorInspectorPlugin::_ParseProperty():
* Fixed method signature
* Use new enum type of parameter for comparison instead of int.
* Use "name" parameter as property-identifying argument to
AddPropertyEditor() instead of undeclared variable
* Fixed override method name in EditorProperty example
Updated example to use virtual method _UpdateProperty() instead of
non-virtual method UpdateProperty().
The example (tutorial) plugin resides in an addons/my_custom_node
subdirectory of its project. The C# example code uses the same
relative path structure for a custom script and icon as the
GDScript example. These paths cause errors when the user activates
the plugin, as Godot looks for the resources in the root directory
of the project. This change fixes the errors by using the fully
qualified "res://" path to the resources in the C# example code.
* Update some C# examples
- Rename members that have been renamed in Godot's C# API for 4.0.
- Change `delta` parameter type to `double`.
- Ensure parameters match base declaration.
- Other minor code fixes.
---------
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
As mentioned here https://github.com/godotengine/godot-docs/issues/6716
add/remove_node3d_gizmo_plugin is the wrong method name. But i'm not sure if it intentionally changed to add/remove_node_3d_gizmo_plugin.
Here are the adjustments anway in case it is intentional and going to stay that way.
get_editor_interface().get_editor_main_control() no longer exists. `get_editor_main_control()` has been replaced with `get_editor_main_screen()`.
I changed all the occurrences in code, as well as adapted the text describing this accordingly.