public static void BeginFieldGroup(bool editMode = true)
 {
     if (currentGroup != null)
     {
         Debug.LogError("Tried to begin a GUI Field Group while another isn't ended yet.");
     }
     currentGroup = new GUIFieldGroup(editMode);
 }
 public static void EndFieldGroup(GUIValueCache cache)
 {
     if (currentGroup == null)
     {
         Debug.LogError("Tried to end a GUI Field Group but there wasn't a 'BeginFieldGroup' call");
         return;
     }
     if (currentGroup.editMode && GUILayout.Button("Apply"))
     {
         currentGroup.ApplyCachedValues(cache);
     }
     currentGroup = null;
 }