There were 4 pages documentation pages still using deg2rad(),
which have been substituted by deg_to_rad() and the examples
tested against 4.0.X.
There was 1 usage of C# Deg2Rad(), now DegToRad().
Some dependent comments and output have been updated accordingly:
(deg_to_rad() is implemented in the Math core functions, not in
the Expressions class), plus some float precission fixes, at
least on my architecture.
Only one mention of rad2deg() was found in all docs.
Fixes#7247
* 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().
* Replace legacy setget in tool tutorial
Replace reference to legacy setget keyword and replace it with the new setter style in the "Running Code in the Editor" tutorial.
---------
Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
The viewport tutorial:
https://docs.godotengine.org/en/latest/tutorials/rendering/viewports.html
did not work for Godot 4- as instead of get_data() from
Texture one should use get_image() from Texture2D.
Also setting a texture didn't work as documented, fixed too.
Tested by using the code on a simple scene with a sprite.
This should be backported to 4.0 branch, but not previous ones.
Fixes#7162
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.