if Engine.is_editor_hint():
var editor_interface = Engine.get_singleton("EditorInterface")
var control = editor_interface.get_base_control()
That should work, you lose code completion though.
if Engine.is_editor_hint():
var editor_interface = Engine.get_singleton("EditorInterface")
var control = editor_interface.get_base_control()
That should work, you lose code completion though.