-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properties doesn't show up when export in script derived from EditorPlugin #49557
Comments
IIRC, this is expected behavior. Exported variables appear in the Inspector if you are inspecting that node / resource instance. But what you're doing is adding a custom dock panel, and the Inspector is still inspecting the script itself. You might need to manually inspect the added custom dock panel node, or design the UI as usual if what you want is a text field on that new dock. |
I want to load a resource from file system with that exported variable. |
Also, FileDialog node doesn't show up even I manually design it in editor. |
You need to use |
There is no EditorFileDialog node in editor. |
@nongvantinh It can be created add added by code. Something like: var dialog = EditorFileDialog.new()
add_child(dialog)
dialog.popup_centered() |
Thanks, It may work. I'll give it a try. |
Add But I don't think it's supposed to be used that way. |
|
That's how Inspector works. I think what you need is your own UI in the dock then :) |
To the beginning. I can not export variable or create some UI node's PackedScene, Material, ResourceLoader, ... |
In case you only want the exported variable when needed instead of always show it, you can use that code snippet to inspect your plugin again when needed (e.g. pressing a button in your dock panel). |
This is just a node, not a scene, so exported vars won't be saved. |
Godot version
Godot Engine v3.3.2.stable.official
System information
Windows 10
Issue description
When writing an editor plugin, I tried to export a variable, but it doesn't show up in the engine.
Steps to reproduce
Write an editor with export variable, look something like this.
export(PackedScene) var CannotExportVariable
And in the editor dock of the plugin doesn't show up exported property.
Minimal reproduction project
ExportPropertiesInEditorPlugin.zip
The text was updated successfully, but these errors were encountered: