I noticed that the tutorial still says `instance()` instead of `instantiate()`, so I changed it to match the 4.x method name.
(cherry picked from commit ef828fb837)
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.