-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 ability to override any editor setting for any project #1480
Comments
One option is that you can have two copies of Godot stored on your computer, and put a |
To complement what @aaronfranke said, see Data paths in the documentation. |
Also I would need to sync other Editor settings on my own but the idea of local editor settings is to have general global Editor settings and at the same time override only some settings for some projects. |
I think you could make symbolic links of the Godot executable (using the |
let me clarify what the proposal should do. say there are Editor settings k, l, m... and I have projects A B C for B: for C: Now I go to Global Editor settings and set all of them to value 2. A: all settings changed to 2, except k = 1 So in this example I would need to create godot.exe for projects k, l, m. |
It might make sense to take inspiration from VS Code, which has both user and workspace settings with the workspace settings being applied on top of any user settings: https://code.visualstudio.com/docs/getstarted/settings The workspace settings can then be added to version control, which is incredibly useful for collaboration. At the same time, each user can have e.g. their own color scheme, font sizes, path settings etc. |
I have some implementation details: in Editor settings we could have "override for current project" button So you could select a property, then press the "override" button and then set the property value. There should be an easy way:
The information for overridden properties could be stored as a project setting say "editor_override" |
+1 My game uses the client / server pattern and I like to set the server project to a different Theme preset so that it is easier to visually distinguish between the 2 projects. Currently this is possible to achieve while both projects are opened, but as soon as both projects are closed and reopened, the last selected theme will be applied to both projects. Fiddling around with my godot editor binary to ensure that each project retains the theme seems unreasonable to me My preferred solution would be for me to create an |
@sneyed You can likely write an editor plugin to do that in the project where you wish the theme to be overwritten. You can also copy the Godot editor binary to another location (or symlink it) and use self-contained mode to use different settings for each binary. |
@Calinou thank you for the suggestion but I feel that both of those workarounds require a disproportionate amount of effort to just set a different theme per project |
Also, I think godotengine/godot#34528 would be a better way to address this problem. |
@Calinou godotengine/godot#34528 would indeed address the issue I described. But consider that I also like to configure the window placement of my server project to the top-left of the screen in Editor Settings so that the 2 windows do not overlap when I run both projects. This is just 1 other example where I would like to set editor setting per project. I feel that there is more value in being able to override any Editor Setting per project, rather than adding additional Project Settings to cover these kind of desires - otherwise I think many Editor Settings may migrate to Project Settings. |
The plugin I'm making now should only work if some EditorSetting is disabled. |
+1 to this issue. I have a Server and a Client project for my game and I work on them at the same time. Without this feature setting up debug ports each time is a bit of a hassle. Also changing the Language Server port each time for an external editor is a pain 😢 |
I feel this particular problem (changing debug port on a per-project basis) is something the editor should handle automatically, rather than requiring you to configure it manually. This should already happen automatically for the editor debugger since 4.0. As for the LSP port, there may be a better way to handle this (e.g. using a random port for the LSP, and storing this port number in a file in |
Well, unless I reset the Debugging port to default, my Remote debugger on Android does not work 😬 Also, I am not sure that "random" ports is a good idea. Sure you can have a range of ports, but that does not mean that there couldn't be collisions |
I'd like something like this, specifically because I contribute to open source projects some of which use "trim trailing whitespace on save" and some of which don't. Not being able to change it per-project is quite annoying. |
Here is an example that overrides some settings using @tool
extends EditorPlugin
var original_settings = {}
func _enter_tree() -> void:
var java_home = OS.get_environment("JAVA_HOME")
var android_home = OS.get_environment("ANDROID_HOME")
if java_home:
set_setting("export/android/java_sdk_path", java_home)
if android_home:
set_setting("export/android/android_sdk_path", android_home)
func set_setting(key: String, value: String) -> void:
var es := EditorInterface.get_editor_settings()
if key not in original_settings:
original_settings[key] = es.get_setting(key)
printerr("Overriding %s => %s" % [
key, value
])
es.set_setting(key, value)
func _exit_tree() -> void:
var es := EditorInterface.get_editor_settings()
for key in original_settings:
es.set_setting(key, original_settings[key]) |
Describe the project you are working on:
gdscript plugins
Describe the problem or limitation you are having in your project:
say there is "constrain editor view" setting.
I'd like to have it enabled by default but disabled for some projects, say for project X.
but now there's no "official" way to do that.
As a result every time I open project X, I need to go to Editor settings, then
disable "constrain editor view" then do some work, and after that set the setting "constrain editor view" back.
and what would be really inconvenient if I need to do this for several/several dosens of Editor settings
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
The idea is adding ability to set editor settings per project.
I think it's possible to have global Editor settings (what Editor settings actually are now) and local ones.
For example the user could specify which settings he wants to be "local", so that these settings won't affect other projects Editor settings.
I believe this would make work with different projects more flexible and customizable, because the user may wish different Editor settings values for different projects (depending on project type, game genre, target platforms and so on)
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
"local project editor settings" could be stored in project res:// dir for example, maybe in a separate file. I think there's no need to write every single setting value, but only values of settings which user make "local"
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't think so
Is there a reason why this should be core and not an add-on in the asset library?:
it could be a plugin but I'm afraid it would be a hacky one, and this won't work correctly in some cases
for example it is obvious that the implementation of this feature as a plugin will require the user to have this plugin active in every project where the user wants to use this feature. And this may be inconvenient
The text was updated successfully, but these errors were encountered: