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

Add editor setting to keep bottom panel state on play and stop game #9513

Closed
Hilderin opened this issue Apr 13, 2024 · 4 comments · Fixed by godotengine/godot#91033
Closed
Milestone

Comments

@Hilderin
Copy link

Hilderin commented Apr 13, 2024

Describe the project you are working on

A 3D air combat game

Describe the problem or limitation you are having in your project

I want to keep the current bottom panels as it is when I start and exit my game.

Each time I start my game from the editor, the Output Panel opens even if the bottom panels are closed. When I'm editing GDScript I like to collapse the bottom panels to have more space, but when I start/close the game and go back to the editor, the Output Panel is now opened.

There is already an option to Open the Output panel instead of the Debugger and an option to close it when exiting the game.
image

The problem with the current options is that I cannot just tell the editor to do nothing on start. If I use the option "Always close Output on Stop" I lose the current bottom panel when I exit the game.

My suggest is similar to #8507 but there is often errors thrown by the engine that are not important (especially when working in dev build).

Example of workflow #1:

  1. Editing script...
    image

  2. Play... We can see the Output panel in the way...
    image

  3. Exit game, when I come back in the Editor... The bottom panel is in the way...
    image


Example of workflow #2:

  1. Editing Animation...
    image

  2. Play... The animation panel is gone...
    image

  3. Exit game... I must click Animation again to go back editing the animation...
    image

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The problem is backward compatibility with the current options. Currently, if the "Always Output on Play" option is Off, the debugger opens on start.
I suggest adding the option "Keep current bottom panel on play" with the default value false:
image

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

If this new option is On, the editor will not open or collapse bottom panels when starting or stopping a game.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't think it's possible.

Is there a reason why this should be core and not an add-on in the asset library?

I'm not sure it can be done with a plugin because it's builtin in the editor code:
image

@passivestar
Copy link

passivestar commented Apr 23, 2024

I like it but imo that entire settings section is starting to look like a riddle that users need so solve, especially if you add a setting that overrides two existing ones, and also the name of the option doesn't reflect that it affects what happens on stop (only the tooltip says it)

What if instead of those 3 settings we do:

On Play (Open Output/Open Debugger/Do Nothing)
On Stop (Close Bottom Panel/Do Nothing)

The default behavior is preserved with On Play (Open Output) and On Stop (Do Nothing)
Your desired behavior is achieved with On Play (Do Nothing) and On Stop (Do Nothing)

Then we'll close both this proposal and #8507, because honestly my main issue was that the debugger is always getting opened no matter what and there's no way to prevent it

@Hilderin
Copy link
Author

My main concern about what you suggest is breaking the compatibility with the existing options.

I agree the this third option is not ideal and if we were starting from scratch your suggestion would be the best choice.

With this third option, I think it's doing exactly what you want: The debugger is not open on start and it opens we there are errors at runtime. And this third option was super easy to code!

I'm new in Godot, maybe somebody else with more experience then me can confirm that backward compatibility is not that important or maybe there is a way not convert old settings in new ones?

@Calinou
Copy link
Member

Calinou commented Apr 24, 2024

My main concern about what you suggest is breaking the compatibility with the existing options.

We should be able to migrate existing editor settings by having a magic getter (_get) in the EditorSettings class. If this is not possible, it's not the end of the world for a minor release as long as it's communicated in the release notes.

@Hilderin
Copy link
Author

Thanks for the answer, I'll look into it!

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

Successfully merging a pull request may close this issue.

5 participants