Inspector Plugins

    This tutorial will explain the process.

    GDScript

    GDScript

    1. class_name MyEditor
    2. var updating = false
    3. func _spin_changed(value):
    4. if (updating):
    5. func update_property():
    6. var new_value = get_edited_object()[ get_edited_property() ]
    7. updating=true
    8. spin.set_value( new_value )
    9. updating=false
    10. func _init():
    11. # if you want to put the editor below the label
    12. # set_bottom_editor( spin )
    13. # else use:
    14. add_child( spin )
    15. # to remember focus when selected back
    16. add_focusable( spin )
    17. spin.set_min(0)
    18. spin.connect("value_changed",self,"_spin_changed")