Browse Source

Merge pull request #2866 from Klowner/fix-inspector-plugin-example

Add proper extends / method calls to inspector plugins tutorial
Rémi Verschelde 5 years ago
parent
commit
c1561b623d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tutorials/plugins/editor/inspector_plugins.rst

+ 2 - 1
tutorials/plugins/editor/inspector_plugins.rst

@@ -49,6 +49,7 @@ Here is an editor for editing integers
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
     
     
     # MyEditor.gd 
     # MyEditor.gd 
+    extends EditorProperty
     class_name MyEditor
     class_name MyEditor
 
 
     var updating = false
     var updating = false
@@ -57,7 +58,7 @@ Here is an editor for editing integers
         if (updating):
         if (updating):
             return
             return
 
 
-        emit_changed( get_property(), value )
+        emit_changed( get_edited_property(), value )
 
 
     func update_property():
     func update_property():
         var new_value = get_edited_object()[ get_edited_property() ]
         var new_value = get_edited_object()[ get_edited_property() ]