{"record":{"id":"ef0afae89f198f8a","repo":"Unity-Technologies/UnityCsReference","slug":"invalid-split-view-data","errorCode":null,"errorMessage":"Invalid split view data","messagePattern":"Invalid split view data","errorType":"exception","errorClass":"LayoutException","httpStatus":null,"severity":"error","filePath":"Editor/Mono/GUI/WindowLayout.cs","lineNumber":192,"sourceCode":"                    Debug.LogWarning($\"{ModeService.currentId} defines both tabs and splitter (horizontal or vertical) layouts.\\n You can only define one to true (i.e. tabs = true) in the editor mode file.\");\n\n                if (useSplitter)\n                {\n                    var splitView = ScriptableObject.CreateInstance<SplitView>();\n                    splitView.vertical = isVertical;\n                    view = splitView;\n                }\n                else if (useTabs)\n                {\n                    var dockAreaView = ScriptableObject.CreateInstance<DockArea>();\n                    view = dockAreaView;\n                }\n\n                view.position = new Rect(0, 0, width, height);\n\n                var childrenData = viewInfo.extendedData[\"children\"] as IList;\n                if (childrenData == null)\n                    throw new LayoutException(\"Invalid split view data\");\n\n                int childIndex = 0;\n                foreach (var childData in childrenData)\n                {\n                    var lvi = new LayoutViewInfo(childIndex, useTabs ? 1f : 1f / childrenData.Count, true);\n                    if (!ParseViewData(availableEditorWindowTypes, childData, ref lvi))\n                        continue;\n\n                    var cw = useTabs ? width : (isVertical ? width : width * lvi.size);\n                    var ch = useTabs ? height : (isVertical ? height * lvi.size : height);\n                    if (useTabs && view is DockArea da)\n                    {\n                        da.AddTab((EditorWindow)ScriptableObject.CreateInstance(lvi.type));\n                    }\n                    else\n                    {\n                        view.AddChild(LoadLayoutView<HostView>(availableEditorWindowTypes, lvi, cw, ch));\n                        view.children[childIndex].position = new Rect(0, 0, cw, ch);","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/Unity-Technologies/UnityCsReference/blob/225b0fbdb57cc17d094e8056b71f8314aba56f73/Editor/Mono/GUI/WindowLayout.cs#L174-L210","documentation":"While deserializing a saved window layout, ParseViewData expects a split view's 'children' entry to be an IList; if it is missing or of the wrong type (null), the layout file is structurally invalid and the editor aborts parsing with LayoutException. This is a data-integrity guard against corrupted or hand-edited .wlt layout files.","triggerScenarios":"Loading a .wlt file whose split-view node lacks a 'children' key or has it as a non-list type; a layout serialized by an incompatible/older Unity version; a manually edited or truncated layout file.","commonSituations":"Sharing layout files across Unity versions; a crash during a previous save leaving a partial layout; third-party tooling that rewrites layout JSON.","solutions":["Discard the corrupt layout file and load the default layout (Window > Layouts > Default).","Restore from a known-good backup of the .wlt file (e.g. Library or user settings backup).","If generating layout files programmatically, ensure every split node has a valid 'children' IList entry.","After a version upgrade, let Unity migrate layouts rather than copying old files directly."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// validate a parsed split node before relying on it\nvar childrenData = viewInfo.extendedData[\"children\"] as IList;\nif (childrenData == null)\n    throw new LayoutException(\"Invalid split view data\");","typeGuard":"static bool IsValidSplitNode(Dictionary<string,object> node)\n    => node.TryGetValue(\"children\", out var c) && c is IList;","tryCatchPattern":"try { EditorUtility.LoadWindowLayout(path); }\ncatch (LayoutException ex) when (ex.Message == \"Invalid split view data\")\n{ /* fall back to default layout */ }","preventionTips":["Keep layout files under source control so corrupt ones can be restored.","Let Unity migrate layouts across versions rather than copying old files.","Validate generated layout files programmatically before distribution."],"tags":["window-layout","serialization","corrupt-data","editor","validation"],"backgroundTag":null,"analyzedSha":"225b0fbdb57cc17d094e8056b71f8314aba56f73","analyzedAt":"2026-08-13T19:07:19.849Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}