Skip to content
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

There should be runtime error when using EditorPlugin in runtime #19669

Closed
kubecz3k opened this issue Jun 20, 2018 · 2 comments
Closed

There should be runtime error when using EditorPlugin in runtime #19669

kubecz3k opened this issue Jun 20, 2018 · 2 comments

Comments

@kubecz3k
Copy link
Contributor

Godot version:
3.0.3

Issue description:
Since EditorPlugin can't be used in non-tools builds, there should be a runtime error in the editor when running a game using it. Not having this error can lead to potentially hard to debug problems on user ends when releasing the game (coming from #19649)

Steps to reproduce:

  1. Create main scene of the project with a script
  2. Add such code in script ready function:
editorPlugin = EditorPlugin.new();
add_child(editorPlugin);
  1. Run the scene, observe that there is no indication that something is not right
@Zylann
Copy link
Contributor

Zylann commented Jun 20, 2018

Note: it sounds like we could do a check for any editor-specific classes, however that's not always possible in case the plugin comes with debugging capabilities (which would require access to editor-only classes into a running game). In Unity, what is done is that the exporter has an option to strip out such code (Debug.Log, Profiler calls etc)

@Calinou
Copy link
Member

Calinou commented Jun 19, 2020

Running the snippet gives the following error messages in Godot 3.2.1, so I'll consider this resolved.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants