Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: MentalFish on November 15, 2012, 08:06:44 PM
-
I am having some issues with input fields not working in the webplayer after upgrading to Unity4. They work inside Unity and standalone players. This was not an issue in 3.5.6.
Apart from that I am having some issues with drop down (popup lists) behaving strangely. The hit area is too small, the width of the dropdown area is too wide and the highlighter seems to have some unwanted padding:
http://dl.dropbox.com/u/1258056/Unity/NGUI_Drop-down_list.mov
-
Input never worked in Flash. I am not sure if that was ever fixed?
As for the padding size, check the sliced sprite you're using. My guess is that you need to eliminate the padding on it (select the atlas, select the sprite, remove padding), and possibly make the border smaller.
-
It's in the Unity Web Player, not Flash.
Using a sprite with no border or padding didn't do much to the clickable area size, the extra widening of the drop down or padding beneath each entry:
(http://dl.dropbox.com/u/1258056/Unity/NGUI_Drop-down_list.png)
-
Feel free to see the web player input bug live here: http://dl.dropbox.com/u/1258056/Unity/NGUI_Built_with_Unity_4.html
-
The web player works fine for me, I'm able to type things just fine. Maybe something is wrong with your browser?
What about the padding setting on your UIPopupList?
-
I can't get input working in any browser, Chrome, Firefox, Opera and Safari. Could you tell me what Unity Plugin version and Engine version you get when going here: http://unity3d.com/webplayer/
This is all kinds of weird brokenness I am getting:
http://dl.dropbox.com/u/1258056/Unity/Unity_Web_Player_version_issues.png
The absurd width and padding issue happened due to the "reference font" I am using got set to the HD/Retina font in code. So now the cause for the problem is gone.
-
There is a bug in Unity 4.0 that affects all web players on Mac OSX. It got fixed recently and will be in 4.0.1.
Builds created using Unity 3.5.6 work correctly.
-
Ok, thanks. I'll just wait out the web player issue until Unity Tech. have fixed it.
Another question though. As you can see, whenever I switch to the HD atlas and font, I get the misbehaving sizing again. This is regardless of where it runs, editor, web player or on retina type iOS device.
(http://dl.dropbox.com/u/1258056/Unity/NGUI_Drop-down_list_HD_misbehaving.png)
Do you have any suggestion as to why this is happening?
-
All I can suggest is look at around line 480 of UIPopupList. That's where it creates the highlight. Background is created above that, on line 468. The dimensions for the size are done around line 485. Does it get the correct sprite? Does it use the proper atlas? The atlas referenced by the UIPopupList must be the reference atlas. If it references the HD atlas, then you have a problem.