Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nubeh

Pages: 1 2 [3]
NGUI 3 Support / Re: Scrollview with clickable buttons in it
« on: October 30, 2013, 05:41:45 AM »
I found out what my problem avoid having a tap trigger a collision with both the GUI elements and the game I made all my elements in the GUI be part of a 2D GUI layer. When I added the elements to my scrollview I forgot to set their layer and they were set to Default and that's why there was no hit event :(

I'm not sure if I have to still but the gui elements on their own layer with the new version of NGUI or if there's a way to tell all the elements to not let a tap affect what's behind them.


NGUI 3 Support / Re: Scrollview with clickable buttons in it
« on: October 30, 2013, 04:00:21 AM » the problem isn't fixed :(. So weird...I put the scrollview object at a depth bigger than the background and it was working...then I changed the scrollview to scroll vertically rather than horizontally and now it doesn't work anymore...the buttons colliders seem to not get any click. I made a big square object as button and I parented a background, 2 labels and a sprite image. Not sure if the parenting so many object might cause the problem?

I tried to put just the button and the background as elements in the scrollview but also with that, no hit :(

NGUI 3 Support / Re: Scrollview with clickable buttons in it
« on: October 29, 2013, 10:02:17 AM »
yeah, stupid me...I did set the buttons depth correctly but the scrollview object containing them had depth 0...I just noticed.

Thanks anyway! ;)

NGUI 3 Support / Scrollview with clickable buttons in it
« on: October 29, 2013, 05:34:41 AM »
I'm trying to build a scrollable list with some buttons in it but I ran into a weird issue: my buttons are not clickable. For some reason the outline panel behind the buttons grid gets the collider hit all the time and I don't know why.

I have buttons in other parts of the scene and they work fine...the only difference with the buttons I have in the scrollview is that those buttons have the UIDrag Panel Contents script attached so that they can be used to drag the panel.

Did someone managed to make something like this and make it work?


NGUI 3 Support / Buttons sprites auto-adjust to match
« on: October 29, 2013, 04:51:25 AM »
There's something a bit annoying about NGUI buttons: if you move the anchor of a button or switch between iOS to Android build all the buttons colliders position gets ruined. Of course I can select each button one by one and chose NGUI -> Add Collider to reset the position, but it gets tedious when my scene has 30-50 buttons.

I noticed that the new NGUI 3.0.3 has an 'auto-adjust to match' option on sprites...but in case of buttons I don't need the background to have a collider, I need the Button object to have one in order to listen for onPress events.

Is there a way to having the colliders resizing and repositioning themselves on button objects automatically?

I have the Keep Crisp option set to Always but my text is not crisp at all. I tested on both iPad2 and Galaxy S4 an in both case the font is not as crisp as if I use the Unity native Dynamic font with the GUI.

NGUI 3 Support / Re: UILabel text with color bug in 3.0.3?
« on: October 29, 2013, 04:24:48 AM »
It works...BUT, there's another bug with this fix. The text is set to ShrinkContent but now it doesn't shrink and in my case it goes out of my screen. The dynamic coloring works.

NGUI 3 Support / Re: Text Sharpness gone in scrollable contents?
« on: October 29, 2013, 03:27:47 AM »
oh, but if I want to work for different mobile platforms I need to keep the root to 'FixedSizeOnMobile' right? Isn't there a way to have crisp text while keeping the fixed size option active?

NGUI 3 Support / Re: Text Sharpness gone in scrollable contents?
« on: October 28, 2013, 08:40:48 AM »
I have the same issue...I'm new to NGUI and I just updated to the new 3.0.3 version today after I read about this Crisp function but when I deploy on iOS or Android devices the text is not crisp.

I use the Overflow - ShrinkContent option and all my labels have integer numbers in their Transform's position. The fonts I imported are set to Rendering Mode - OS Default and the Include Font Data option is unchecked.

Looking forward to some hint ;)

NGUI 3 Support / UILabel text with color bug in 3.0.3?
« on: October 28, 2013, 07:45:15 AM »
Hi there,
I had this code working last week where I was setting the text on a UILabel using a color variable for the text color like this:

myLabel.text = "["+color+"]"+mytext+"[-]"

but after updating to NGUI 3.0.3 I get this error:

ArgumentOutOfRangeException: startIndex + length > this.length
Parameter name: length
System.String.Substring (Int32 startIndex, Int32 length) (at /Applications/buildAgent/work/c514da0c8183631c/mcs/class/corlib/System/String.cs:356)
NGUIText.WrapText (System.String text, UnityEngine.Font font, Int32 size, FontStyle style, Int32 width, Int32 height, Int32 maxLines, Boolean encoding, System.String& finalText) (at Assets/NGUI/Scripts/Internal/NGUIText.cs:414)
UILabel.ProcessText (Boolean legacyMode) (at Assets/NGUI/Scripts/UI/UILabel.cs:800)
UILabel.ProcessText () (at Assets/NGUI/Scripts/UI/UILabel.cs:762)
UILabel.ProcessAndRequest () (at Assets/NGUI/Scripts/UI/UILabel.cs:296)

I also enabled on the UILabel the ShrinkContent option with Crisp Always.

Does anybody else have the same issue?

I'm new to NGUI and I'm trying to figure out the same...if I use dynamic fonts I can select to shrink the content in a label, clamp it and so on. By resizing the label object then I resize the font as well. The problem is that, even though I'm using a 'dynamic font' it still looks blurry on an iPad for example.

The native dynamic fonts of Unity look crisp when you dynamically set the font size in the OnGUI call so I was wondering how to get the same result using NGUI.


Pages: 1 2 [3]