-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Error exporting a Mono project with an editor plugin #51784
Comments
I think EditorPlugins are only supposed to run in the editor. GDScript plugins also have this behavior, which leads me to believe that this is intentional. |
Yes, access to the editor API must be surrounded with |
It make sense ofc.. But still sometime a EditorPlugin is necessary to run. In my case I use to export the current project and run it outside editor in order to make free some hw resources while working in connected projects. Otherwise I have to pretend the project is finished and run it somewhere else. If I'm not mistaken there was an issue/discussion where mentioned the editor log port to be related to the project and not to the game engine. |
I'm not really sure what you mean by "hw resources" and "editor log ports" but I normally keep my plugin logic out of editor-related classes such as |
For "hw" I mean "hardware" :).. and for "editor log ports" I mean this one (from code before posted) : |
Closing as working as intended. Godot's Editor APIs (such as the Access to Editor APIs must be surrounded with #if TOOLS
using Godot;
[Tool]
public class SomeEditorPlugin : EditorPlugin
{
// Code here...
}
#endif The use of the define constant |
Godot version
3.4.beta3 mono
System information
debian 10
Issue description
When I try to export I have this error
addons/editorsettings/plugin.cs(5,23): The type or namespace name 'EditorPlugin' could not be found (are you missing a using directive or an assembly reference?)
the error screenshot:
While i can compile and run it without problems.
Here other errors in console:
addons/editorsettings/plugin.cs(10,26): 'plugin._Ready()': no suitable method found to override
addons/editorsettings/plugin.cs(18,26): 'plugin.EnablePlugin()': no suitable method found to override
Steps to reproduce
this is my plugin:
Minimal reproduction project
na
The text was updated successfully, but these errors were encountered: