godotengine / godotengine/godot-cpp

[GDExtension ]A class which inherit from `EditorPlugin` can't be recognized correctly in editor.

Open
#912 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

First, code a class `TestEditorPlugin` which inherit from `EditorPlugin` in cpp:
```
class TestEditorPlugin: public EditorPlugin{
GDCLASS(TestEditorPlugin, EditorPlugin)
protected:
static void _bind_methods(){}
};
```

Second, code a simple editor plugin which extends form `TestEditorPlugin`:
[plugin.gd]
```
@tool
extends TestEditorPlugin
```

Last, enable it in editor, will popup an error:
![image](https://user-images.githubusercontent.com/61624558/200252500-422da94d-a4e9-4edf-a686-06b8aea2ce13.png)

As you can see, the `TestEditorPlugin` is recognized in editor and the help document show that it is inherit from `EditorPlgin`.

------------------------------------------

My target is to develop a plugin in cpp without using GDScripts or any scenes ( I think GDExtension should provide some callback after editor boot finished, we can add our cpp plugin manually), But it seems there is no way to achive, so I try to using a simple plugin to setup my cpp plugin, and the result is weird.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.