godot-cpp icon indicating copy to clipboard operation
godot-cpp copied to clipboard

[GDExtension] EditorPlugin Tool

Open CornLizard opened this issue 4 years ago • 2 comments

Godot version

v4.0.dev.custom_build [ed5267f69]

System information

Manjaro 21 KDE, 1950x threadripper, 1080 TI, Vulkan, 16GB Memory

Issue description

My problem isn't really an error more or less a missing feature? I'm unable to find a solution to using tool. I found some posts about using the old GDNative and modules. I cannot find the equivalent in GDExtensions if there is any.

Module solution

EditorPlugins::add_by_type<MyPlugin>();

GDNative solution

register_tool_class<MyPlugin>();

CornLizard avatar Oct 04 '21 20:10 CornLizard

I thought in GDExtension all classes were tool? (just like every class in the Godot core source code. tool is only a feature of scripts, and GDExtensions are not scripts)

Zylann avatar Nov 13 '21 17:11 Zylann

Although there seem to be confusion between two things on this issue:

  1. Yes, I think GDExtension classes are all "tool" in the sense that they will run in editor if nodes are added to scene tree.
  2. No, GDExtension does not seem to have any way to register EditorPlugins like modules can. This is an issue that needs solving.

Zylann avatar Nov 13 '21 17:11 Zylann