i want to box in a section of my custom editor but i am not quite sure how. How can i add the following to a box: Code (CSharp): EditorGUILayout.Space(); EditorGUILayout.LabelField("Main Wind Setting", EditorStyles.boldLabel); EditorGUI.BeginDisabledGroup(controller.SynchWindZone && controller.windZone); WindStrength.PropertyField("Intensity", "Main Wind Strength"); WindTurbulence.PropertyField("Turbulence", "Main Wind Turbulence"); WindPulse.PropertyField("Pulse Magnitude", "Main Pulse Frequency"); EditorGUI.EndDisabledGroup(); EditorGUILayout.Space(); WindRandomness.PropertyField("Random Offset", "Main Wind bending random offset"); EditorGUILayout.Space();
Just wrap your code in a vertical group and give that group the box style Code (CSharp): GUILayout.BeginVertical("box"); // your code GUILayout.EndVertical(); Note: You can use pretty much any style for any visual element. For example I often use the button style for Toggles. Of course you are free to design your own styles. For more information see my IMGUI crash course and especially the section about the GUIStyle and GUISkin classes.