diff --git a/tutorials/plugins/editor/inspector_plugins.rst b/tutorials/plugins/editor/inspector_plugins.rst index f9515001696..bcf4bbc5c37 100644 --- a/tutorials/plugins/editor/inspector_plugins.rst +++ b/tutorials/plugins/editor/inspector_plugins.rst @@ -143,20 +143,22 @@ specifically add :ref:`class_EditorProperty`-based controls. public partial class MyInspectorPlugin : EditorInspectorPlugin { - public override bool _CanHandle(Variant @object) + public override bool _CanHandle(GodotObject @object) { // We support all objects in this example. return true; } - public override bool _ParseProperty(GodotObject @object, int type, string name, int hintType, string hintString, int usageFlags, bool wide) + public override bool _ParseProperty(GodotObject @object, Variant.Type type, + string name, PropertyHint hintType, string hintString, + PropertyUsageFlags usageFlags, bool wide) { // We handle properties of type integer. - if (type == (int)Variant.Type.Int) + if (type == Variant.Type.Int) { // Create an instance of the custom property editor and register // it to a specific property path. - AddPropertyEditor(path, new RandomIntEditor()); + AddPropertyEditor(name, new RandomIntEditor()); // Inform the editor to remove the default property editor for // this property type. return true; @@ -283,7 +285,7 @@ followed by ``set_bottom_editor()`` to position it below the name. EmitChanged(GetEditedProperty(), _currentValue); } - public override void UpdateProperty() + public override void _UpdateProperty() { // Read the current value from the property. var newValue = (int)GetEditedObject().Get(GetEditedProperty());