UI Control Editor errors

This is the place to find out how to accomplish something specific with EZ GUI.

UI Control Editor errors

Postby sharmoni » Sat Sep 18, 2010 12:25 am

How can I get the editor working again? I can no longer use the UI Control Editor to change button states for my UIToggleBtn.

from the Console:
ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] (at /Users/build/builds/unity-iphone/iphone/Runtime/Export/Generated/GUILayout.cs:131)
UIStateToggleBtn.DrawPostStateSelectGUI (Int32 selState) (at Assets/Plugins/EZ/GUI/Controls/UIStateToggleBtn.cs:489)
UICtlEditor.OnGUI () (at Assets/Editor/Editors/UICtlEditor.cs:207)
UnityEditor.EditorWindow:Show(Boolean) (at /Users/build/builds/unity-iphone/iphone/Editor/Mono/Generated/Utility.cs:671)
UICtlEditor:ShowEditor() (at Assets/Editor/Editors/UICtlEditor.cs:69)


also:
ArgumentException: GUILayout: Mismatched LayoutGroup.mouseMove
UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] (at /Users/build/builds/unity-iphone/iphone/Runtime/Export/Generated/GUILayout.cs:131)
UIStateToggleBtn.DrawPostStateSelectGUI (Int32 selState) (at Assets/Plugins/EZ/GUI/Controls/UIStateToggleBtn.cs:489)
UICtlEditor.OnGUI () (at Assets/Editor/Editors/UICtlEditor.cs:207)


I've tried deleting all the folders for EZGUI, EZGameSaver, and SpriteManger2 and then re-importing them, but the error persists. I tried building a new button and the UI Control Editor will let me edit the states if it's a Button or a 3D Toggle Button, but not for the Toggle Button.

Is there a more thorough way to clear out everything for EZGUI and reinstall? I suspect the problem is from having installed the 1.1 version at some point and then importing the 1.05 package over it to be able to get some of the new features I needed.
sharmoni
 
Posts: 53
Joined: Fri Jul 30, 2010 1:36 am

Re: UI Control Editor errors

Postby Brady » Sat Sep 18, 2010 7:32 am

I suspect it could be because of the dynamic nature of the toggle button's states. Try selecting the toggle button in question and then click on the little "gear" icon in the inspector for the UIStateToggleBtn component, and then choose "Reset". This will completely reset the control itself, but I think it may resolve the error.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: UI Control Editor errors

Postby sharmoni » Sat Sep 18, 2010 4:49 pm

Something is seriously wrong and I can't figure out what it is.

I've tried the following on both my computers (one which had never run Unity):
Reinstalled (or installed) Unity iPhone 1.7
Repaired permissions
Started Mac with shift key to disable login programs
Created a new project with no game object, or with just one
Imported EZGUI

I get errors on every class and script (Console log attached) and no functioning interface for EZGUI.

Variations: installing Standard iPhone Package before and after EZGFUI, also importing SpriteManager2 (additional errors), EZGameSaver (no errors), importing EZGUI 1.01 instead, importing EZGUI 1.1_b9 instead.

I'm beyond baffled. I can't see how two different Macs would get the same errors when I never had these errors before. The only thing they have in common is being up to date with software from Apple. The Mini has very little software running on it.

Just to add to the weirdness, my actual project gives me no errors (other than the ones for the Toggle Button).
Attachments
Editor.log.zip
from Mac Mini empty project importing EZGUI 1.05_b3 and SM2 1.74
(9.28 KiB) Downloaded 110 times
sharmoni
 
Posts: 53
Joined: Fri Jul 30, 2010 1:36 am

Re: UI Control Editor errors

Postby sharmoni » Sat Sep 18, 2010 5:38 pm

On thing I discovered: the control editor will show all the states and textures correctly when the program is running. It won't show the method though. And of course, any edits done while running disappear, so that doesn't help me.
sharmoni
 
Posts: 53
Joined: Fri Jul 30, 2010 1:36 am

Re: UI Control Editor errors

Postby Brady » Sat Sep 18, 2010 8:00 pm

On those other errors, I think you have forgotten to set the API compatibility level to .NET 2.1.

On the run-time settings issue, yes, you cannot save changes made at runtime in Unity.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: UI Control Editor errors

Postby sharmoni » Sun Sep 19, 2010 3:21 am

Yep, I was just rushing and didn't set up anything, no UIManager, etc. Ok, so I was more careful and got past all the log errors, but then I was back to where I started: I couldn't edit a Toggle Button with the Control Editor. This was in the test project with only two objects and a camera. One object had the UIManager and the other had the button. I checked the settings for the button and it was the same as the one in my project, which works, even though I can't edit that one either.

I opened a backup from some time ago and that project was fine—the Control Editor worked on the Toggle Buttons. And I could create a new one that was editable. As soon as I imported 1.05_b3, it broke and I could no longer edit the Toggle Button. I don't know what version of EZGUI I had running in that older backup.

So I tried copying the UIStateToggleBtn.cs from the older backup project into my current project folder and it works. Now I can edit my buttons again. Once I've got the editing done, I can probably put back in the newer script to use the features I need, like setting the toggle state in code.
sharmoni
 
Posts: 53
Joined: Fri Jul 30, 2010 1:36 am

Re: UI Control Editor errors

Postby Brady » Mon Sep 20, 2010 8:44 am

Just to be clear, in the test where you started with b3, did you create the toggle from scratch under b3 from start to finish? I'm asking because I'm wondering if it is something to do with it getting a little mixed up over the added per-state label text, and it is expecting to find label strings for existing controls created in an earlier version and not finding them?
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: UI Control Editor errors

Postby sharmoni » Mon Sep 20, 2010 9:28 pm

Yes. Just to be sure I repeated my steps. New project. Change to Net 2.1. Import EZGUI 1.05_b3. Create empty GameObject. Add UIManager script. Create 2nd GameObject. Add UIStateToggleBtn script. Same errors and empty Control Editor window (actually it has the Add State button).
sharmoni
 
Posts: 53
Joined: Fri Jul 30, 2010 1:36 am

Re: UI Control Editor errors

Postby Brady » Mon Sep 20, 2010 10:14 pm

Okay, this information has helped me track it down. It was, sort of as I suspected, related to the new state label feature. In the Unity iPhone 1.7 conditional compilation block, it was missing an extra GUILayout.EndVertical(). This fix will be included in the next release. For now, however, you can just add a second GUILayout.EndVertical() right after the existing one at the end of the "DoStateLabel()" method inside of UICtlEditor.cs which is found under Editor/Editors. Thanks!
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: UI Control Editor errors

Postby sharmoni » Mon Sep 20, 2010 11:34 pm

Awesome. That really helps me get my app finished in time to meet Apple's submission deadline! Much, much thanks, Brady.
sharmoni
 
Posts: 53
Joined: Fri Jul 30, 2010 1:36 am

Next

Return to EZ GUI How to...

Who is online

Users browsing this forum: No registered users and 10 guests