Author Topic: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint  (Read 15001 times)

dis

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« on: March 07, 2013, 02:23:03 PM »
Hello!

1. Create empty object
2. Add UITexture
3. Add UIStretch
4. Disable UITexture (uncheck the checkbox in inspector)
5. Start program.

The described error appears even if UIStretch is also disabled.

Line 44 in UITextureInspector.cs
Texture tex = EditorGUILayout.ObjectField("Texture", mTex.mainTexture, typeof(Texture), false) as Texture;


ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:158)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/GUILayout.cs:174)
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/GUILayout.cs:166)
UnityEditor.EditorGUILayout.ObjectField (System.String label, UnityEngine.Object obj, System.Type objType, Boolean allowSceneObjects, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorGUI.cs:3652)
UITextureInspector.OnDrawProperties () (at Assets/NGUI/Scripts/Editor/UITextureInspector.cs:44)
UIWidgetInspector.OnInspectorGUI () (at Assets/NGUI/Scripts/Editor/UIWidgetInspector.cs:49)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/Inspector/InspectorWindow.cs:888)
UnityEditor.InspectorWindow.OnGUI () (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/Mono/Inspector/InspectorWindow.cs:243)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #1 on: March 07, 2013, 04:16:47 PM »
Unity 4 changed something inside of it that cause these to appear sometimes. I always get this kind of a GUILayout error when adding a new sprite to an atlas in Unity 4, for example. Unity 3 works as expected, so it's a regression issue in Unity.

Either way it seems harmless, and an editor-only issue.

dis

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #2 on: March 08, 2013, 01:20:28 AM »
Oh, I forgot to mention that I use Unity Version 3.5.7f6. It seems the error appears on editor only.

CoolTim

  • Guest
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #3 on: April 02, 2013, 05:13:03 PM »
Dis, Arenmook - I'm running into the same problem - did you ever figure out what was causing it? I'm also not on Unity 4.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #4 on: April 02, 2013, 10:40:42 PM »
Nope, and I am not running into it in 4.1, so perhaps something in 3.5.x?

cbartlett

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 43
    • View Profile
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #5 on: June 17, 2013, 09:04:14 AM »
Im running into it in 4.1

kfboelter

  • Guest
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #6 on: August 22, 2013, 03:27:12 PM »
4.1.5f1 here...

Any news on that?
Still harmless? :)

kreso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #7 on: November 18, 2013, 08:13:44 PM »
Unity 4.3 here - this is still happening (when creating a new sprite collection). It seems harmless except that there is a red warning in the console.

ArenMook, is this article perhaps related? http://forum.unity3d.com/threads/158375-Unexplained-GUILayout-Mismatched-issue-is-it-a-Unity-bug-or-a-miss-understanding

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
« Reply #8 on: November 19, 2013, 09:24:21 PM »
I've seen even Unity's own components trigger that (mainly ones that involve parts of the inspector window scaling in/out). It's some harmless issue that is thankfully rare, and completely harmless (which is likely why it doesn't get fixed).