fix(editor): store zui_layout.ini in ZodiacEngine/Settings/ - #700
Merged
Conversation
…699 Previously the path was a bare "zui_layout.ini" resolved from the process working directory; a clean build or different launch path would silently reset the layout. The layout is an engine setting (not project-specific) so it belongs in ZodiacEngine/Settings/ — the directory managed by EngineAssetsBackend. Fix: - Check EngineAssetsBackend.Exists("/Settings") to confirm the directory is accessible (created by the engine build, no runtime mkdir needed) - Use VFSPath::ResolveNative(NativeRoot()) to produce the native path via the engine's own path API instead of manual string concatenation - Falls back to "zui_layout.ini" in the working directory when the Settings directory is not yet available
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.
Summary
Closes #699
zui_layout.iniis an engine setting (not project-specific) and belongs inZodiacEngine/Settings/— the directory managed byEngineAssetsBackendand created during the engine build. Previously it was written as a bare"zui_layout.ini"resolved from the process working directory, silently resetting on every clean build or launch from a different CWD.Approach
EngineAssetsBackend.Exists("/Settings")— verify the directory is accessible via the engine's own VFS backend (no runtimemkdir, the directory is created by the build)VFSPath::ResolveNative(NativeRoot(), ...)— produce the native path through the engine's path API instead of manual string concatenation"zui_layout.ini"in the working directory whenSettings/is not yet availableResult path
The file is written on first layout change (
LayoutDirty), not on every launch.