Description
I noticed that it is not possible to modify properties of native classes during a debug session, i.e., in the "remote" scene tree. The properties get displayed in the Inspector, and modifying them produces a "set foobar" message, but the value doesn't change.
A minimal project to reproduce the issue is available here (the native class simply prints its property in _process
, so modifications in the live Inspector should change the value).
@Bromeon found some related discussions:
- https://godotengine.org/qa/93920/can-i-do-everything-in-gdnative-c
- Exported variables are not updated in the inspector when their value is changed via GDScript godotengine/godot#21009
An initial guess: We somehow have to call Object.property_list_changed_notify
after a property gets set. However the after_set
mechanism doesn't seem to work either, so I'm not sure if we get a chance to call it. Edit: On second, I'd say that property_list_changed_notify
solves the inverse problem of the Inspector not updating the displayed value. In this case the value actually does update visually in the Inspector, but the change doesn't propagate into the native class instance. Perhaps a GDNative limitation after all?