Skip to content

Commit 8d3af91

Browse files
committed
Fix incorrect prefab modification gui
1 parent 05b0932 commit 8d3af91

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Editor/Editors/TriEditorCore.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,32 @@ public VisualElement CreateVisualElement()
113113
EditorGUIUtility.labelWidth = Mathf.Max(labelMinWidth,
114114
container.resolvedStyle.width * labelWidthRatio - space);
115115

116+
GUILayout.BeginVertical(Styles.RootLayout);
116117
OnInspectorGUI(root);
117-
}));
118+
GUILayout.EndVertical();
119+
})
120+
{
121+
style =
122+
{
123+
marginLeft = -Styles.RootMarginLeft,
124+
marginRight = -Styles.RootMarginRight,
125+
},
126+
});
118127

119128
container.Add(root);
120129

121130
return container;
122131
}
132+
133+
private static class Styles
134+
{
135+
public const int RootMarginLeft = 15;
136+
public const int RootMarginRight = 6;
137+
138+
public static readonly GUIStyle RootLayout = new GUIStyle
139+
{
140+
padding = new RectOffset(RootMarginLeft, RootMarginRight, 0, 0),
141+
};
142+
}
123143
}
124144
}

0 commit comments

Comments
 (0)