Hello hopefully someone can help me with my OCD problem really quick. It’s probably something stupid but it is really bugging me. Why won’t the buttons line up vertically with the rest of the controls?
My code:
EditorGUILayout.BeginHorizontal();
{
level = EditorGUILayout.Popup(level, levels, GUILayout.MaxWidth(150f));
EditorGUILayout.LabelField("Wave ", GUILayout.MaxWidth(50f));
wave = EditorGUILayout.IntField(wave, GUILayout.MaxWidth(25f));
if (GUILayout.Button("-", GUILayout.MaxWidth(25f)))
{
if (wave > 0)
{
wave--;
}
}
if (GUILayout.Button("+", GUILayout.MaxWidth(25f)))
{
wave++;
}
}
EditorGUILayout.EndHorizontal();
Thank you for your time and help!