-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Add separate feature tags for editor runtime #85678
Conversation
e4bf519
to
652229c
Compare
652229c
to
773d0e7
Compare
Per the Godot jargon, it would have to be |
Out of curiosity, why not |
core/config/project_settings.cpp
Outdated
@@ -1337,7 +1337,7 @@ ProjectSettings::ProjectSettings() { | |||
GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"), 0); // 8K resolution | |||
|
|||
GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true); | |||
GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor", false); | |||
GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor_main", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes behavior a little since the project running from the editor will now keep the screen on (this may or may not be desired, especially on a laptop on battery). Just noting this for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the previous behavior was not really intended; it came from a limitation.
773d0e7
to
846a08b
Compare
a1badcb
to
491cbeb
Compare
presets.insert("editor"); | ||
presets.insert("editor_hint"); | ||
presets.insert("editor_runtime"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we shouldn't have just editor
and editor_runtime
(so keep using editor
for what is now editor_hint
in this PR).
This would slightly break compat on the behavior of editor
, but IMO the current behavior is confusing, and the two new feature tags make it worse as it's not obvious to users what's the difference between editor
and editor_hint
/editor_runtime
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
editor
is useful for any code that's supposed to run only in editor build, so that the code does not accidentally slip to exported project, thus making it closer to editor_runtime
. From my experience at least, idk how other people use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one could use debug
for that? But yeah, I guess it still makes sense to have a feature that matches target=editor
specifically. The names are just a bit confusing.
I'm not too fond of editor_hint
specifically, though I know that's what we have in Engine
. I guess it's the best we can do for now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one could use debug for that?
Unless they ship game using debug build (which can happen sometimes ;)
Thanks! |
This PR adds 2 new feature tags:
editor_hint
andeditor_runtime
. The former is used in the editor, the latter in running project. Both are only available in editor builds.editor
feature tag stays as is, for compatibility reasons and for consistency withtemplate
. Documentation will need updating after this is merged.EDIT:
editor_hint
.