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

Extension classes running in editor may be undesired #70

Closed
Bromeon opened this issue Jan 16, 2023 · 0 comments · Fixed by #365
Closed

Extension classes running in editor may be undesired #70

Bromeon opened this issue Jan 16, 2023 · 0 comments · Fixed by #365
Labels
c: ffi Low-level components and interaction with GDExtension API quality-of-life No new functionality, but improves ergonomics/internals

Comments

@Bromeon
Copy link
Member

Bromeon commented Jan 16, 2023

C++ binding: godotengine/godot-cpp#709.

Several users have already complained about this independently. The behavior that all classes run in the Godot editor can be unintuitive, especially when coming from Godot 3.

Needs investigation if Engine::singleton().is_editor_hint() (see link) can be used to disable user code outside the game.
We could add an opt-in at global entry point (unsafe impl ExtensionLib).

@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: ffi Low-level components and interaction with GDExtension API labels Jan 16, 2023
bors bot added a commit that referenced this issue May 1, 2023
253: DTC example - Don't `_process` on player in editor r=Bromeon a=Lamby777

Same bug we went over on the Discord channel.

Prevents this stuff from happening in the editor:
![image](https://user-images.githubusercontent.com/35111165/235373942-9da696f3-9c9e-430e-bc71-327010524058.png)

...at least, until #70 is resolved. Then, this can be removed, since it's not necessary.

Co-authored-by: Dex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: ffi Low-level components and interaction with GDExtension API quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant