Author Topic: Orphaned GUI Elements solution?  (Read 1806 times)

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Orphaned GUI Elements solution?
« on: August 29, 2013, 01:55:42 PM »
I brought this up last week and nothing was resolved. It was thought that NGUI was updated improperly but after confirming it was indeed updated correctly, the issue still stood.

I'm coming back now with some findings:

It seems that if UI elements are deeply nested, there is something about it that breaks and causes them to become orphaned and require either restarting Unity or Force Deleting the objects. The bug only begins after entering Play mode, you'll see the UI elements 'stuck' and don't go away even after disabling them, and even after exiting Play mode.

Our only solution now is to just not nest UI elements so deeply.
---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Orphaned GUI Elements solution?
« Reply #1 on: August 29, 2013, 03:34:57 PM »
If you can clean up the project and submit a simple version of it that reproduces the bug consistently, I'll investigate. I can't reproduce it myself, so I can't fix what I can't reproduce.

Use support@tasharen.com for submitting the files.

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: Orphaned GUI Elements solution?
« Reply #2 on: August 29, 2013, 04:16:45 PM »
Perhaps this error could be a part of it. The issue came right back even after unnesting objects.


  1. ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
  2. UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType)
  3. UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options)
  4. UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options)
  5. UnityEditor.EditorGUILayout.ObjectField (System.String label, UnityEngine.Object obj, System.Type objType, Boolean allowSceneObjects, UnityEngine.GUILayoutOption[] options)
  6. UITextureInspector.DrawProperties () (at Assets/NGUI/Scripts/Editor/UITextureInspector.cs:48)
  7. UIWidgetInspector.OnInspectorGUI () (at Assets/NGUI/Scripts/Editor/UIWidgetInspector.cs:766)
  8. UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
  9. UnityEditor.DockArea:OnGUI()
---------------------------
Jacob S.
Game Programmer
---------------------------