-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move config from editor- to projectSettings
EditorSettings are per-machine and not accessible when starting scenes (even from the editor). So instead we use the projectSettings, to at least get these config vals going. This might make more sense than editor settings, and could be useful to override with feature tags and what not. Still a bit of a mess, naming-wise, and seems to throw errors before the settings have been created in the project :/
- Loading branch information
1 parent
2a4f1c2
commit 0251bdb
Showing
4 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
@tool | ||
extends EditorPlugin | ||
|
||
var editor_settings | ||
|
||
func _enter_tree(): | ||
editor_settings = get_editor_interface().get_editor_settings() | ||
editor_settings.settings_changed.connect(on_settings_changed) | ||
|
||
Log.setup_config(editor_settings) | ||
Log.pr("log.gd entering tree") | ||
ProjectSettings.settings_changed.connect(on_settings_changed) | ||
|
||
func on_settings_changed(): | ||
if editor_settings.check_changed_settings_in_group(Log.KEY_PREFIX): | ||
var changed_keys = editor_settings.get_changed_settings() | ||
Log.setup_config(editor_settings, {updated_keys=changed_keys}) | ||
Log.setup_config() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters