Persist FPS slider and Enter Play Mode dropdown across editor restarts#39
Open
alperunlu07 wants to merge 1 commit into
Open
Persist FPS slider and Enter Play Mode dropdown across editor restarts#39alperunlu07 wants to merge 1 commit into
alperunlu07 wants to merge 1 commit into
Conversation
ToolbarFPSSlider: - Mark selectedFramerate [SerializeField] (default 60) so the chosen value survives domain reload / editor restart. - Replace global GUI.changed with EditorGUI.BeginChangeCheck/EndChangeCheck to avoid reacting to unrelated GUI events. - Save() the toolbar setting on change so toolbar-side edits are persisted even when the Project Settings panel is not open. ToolbarEnterPlayMode: - Mark selectedEnterPlayMode [SerializeField] as a defensive cache. - Lazy-init enterPlayModeOption labels in OnDrawInToolbar in case the initializer hasn't run yet. - Apply selection to EditorSettings via a dedicated helper, called both on Init() and on user change, so the saved value is enforced on editor open. - Switch to BeginChangeCheck/EndChangeCheck instead of GUI.changed. - Save() the toolbar setting on change.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ToolbarFPSSlider:
ToolbarEnterPlayMode: