Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Game Whiz on September 03, 2012, 10:56:16 AM
-
Hi,
I have a checkbox in a panel that behaves just as expected. However if I uncheck the checkbox, deactivate the UI (SetActive or SetActiveRecursively to false) and activate the UI, the checkbox checkmark doesn't appear again when I try to check it. the state is changed, since if I check it (nothing appears), and then deactivate and activate the GUI again, it appears checked.
Bug or something I'm doing wrong?
Best regards,
Alex
-
When the UIButton / UIButtonColor is enabled, it records the current color as the "starting" color. Since you faded it out, the starting color has the alpha of 0.
-
That's not it. The starting color does indeed have alpha=0 when I reactivate the gui, but it then tweens to alpha=1 when I click on the checkbox. The problem is that the checkmark isn't appearing even with alpha=1. If I deactivate and activate the checkmark in the editor during runtime, it then correctly appears.
-
The problem was that the panel in which the checkbox was, was marked as static. I had clicked to clear the static checkmark, but I failed to notice that under Unity 4.0 the static field in the panel isn't clickable (and the panel continued as static). It's a Unity bug that you probably should report. A quick fix is to get rid of the GUILayout.Width() in the UIPanelInspector.
-
Yup, this bug has been reported to Unity as far as I know. Phil mentioned it before. It's a regression issue, so I hope they will fix it soon.