Godot Version
v4.4.1.stable.fedora [49a5bc7b6]
Question
I’m putting together a simple scene to run part of my game alongside controls for creating and selecting resources that control the difficulty. I don’t really want to recreate the whole inspector UI to edit the resource, I’d rather use the embedded game window and the editor inspector.
Is there a way to control the editor’s inspector from a running scene? In order to tune my game’s difficulty I want to tweak the difficulty resource and have it applied in real-time.
This already works if I navigate to the resource and edit it in the inspector while the scene is running, but I’d like to have the scene script automatically load the resource I’m working on in the inspector without me having to find the correct one manually.
I tried to use EditorInterface.get_inspector() but that gives me an error when I run the scene that the function does not exist.
Is there a proper way for me to get access to the inspector? Or, is there a more idiomatic way to have a scene designed as a tool for editing game data?