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 - blitzer

Pages: 1 2 3 [4]
46
NGUI 3 Support / Trouble with UIPanel Transform Position
« on: March 26, 2014, 11:12:33 PM »
Hello everyone, I'm encountering a problem where a UIPanel is showing a very strange transform location, and I cannot change it.

In my case, I'm using Alpha Clipping, and its showing:
offset: 8596, 0.33...
center: -7895, -0.33....
size: 898 x 375
Transform position: -674, 0,0

It is also parented to a larger container (all anchor points are +/- 0). As mentioned above, I cannot change this location (although I think it used to be at -300-ish (which was still wrong) and by using the inspector and dragging it, it jumped to -700 and is now stuck there. I have also tried changing the position through script (nothing happens), although after the scene is running, I can successfully change it to anything I want.

I'm stumped as to what to do, this panel is throwing off every object inside it and causing a mess. Any ideas are appreciated.

47
NGUI 3 Documentation / Re: UIGrid
« on: March 24, 2014, 11:45:52 PM »
Is my current understanding that there is no current way to either align or re-size a UIGrid according to its parent at this time? Any clarification is appreciated.

48
I see, although I don't think UI Root is the problem or solution. I suppose making different UI prefabs with different button sizes and loading them according to the device would be the best way to go about it.

49
@ ArenMook, perhaps I'm not using the terminology correctly. Let me put it this way:

Lets say a UI element does take 30% of the screen and in the editor that looks fine. But, when you see it on a iPad that 30% size makes to hard to use // while on a iPhone that 30% is so small it is hard to use. Is there a way to, say based on device type, change the way NGUI is drawing all of the UI elements on that device (so say that on a iPad that element changes to 15%, while on a iPhone it changes to 50%)?

Maybe I could take pictures of the UI on actual devices and post those? I'm not really sure how to explain it any better.

50
NGUI 3 Support / Everything is Scaling Too Perfectly....Wait...What?
« on: March 21, 2014, 02:27:39 PM »
Hello everyone, I've come across a situation where my UI is encountering some scaling issues on mobile devices (actually, everything is scaling perfectly...and that is the problem). I'm using a Fixed Size UI Root option, and all the UI elements are staying in place nicely. The problem is, on deices like an iPad, the buttons get so large they become problematic (too much distance between buttons), but on iPhones, the buttons are so small that they often miss touch input or do not activate the scripts attached to them. So:

-Is there a best practice for this type of situation? Maybe getting the device type and either scaling all UI setups for NGUI or perhaps loading different UI setups for NGUI?

-I've also noticed that on iPhone 4s, even the larger buttons often miss touch input, is this a problem with the phone itself or with my setup?

Any advice is appreciated.

51
NGUI 3 Support / Re: Trouble with OnClick Being Called Twice
« on: March 20, 2014, 01:02:16 AM »
Sure enough, that was exactly what is happening. Thank you very much for the help.

52
NGUI 3 Support / Trouble with OnClick Being Called Twice
« on: March 19, 2014, 10:55:21 PM »
Hello everyone, I'm having trouble with using OnClick since it seems to happen 2 times for every button click. I've read this thread [http://www.tasharen.com/forum/index.php?topic=1636.0] but it does not address my problem (detailed below):

I've got a basic debugging script that allows me to jump my current spawn point forward or backwards by 1 on each click. However on click, the spawn jumps by 2 either forwards or backwards depending on the button logic. I have been using the spawn jump script for a while and I know it does work (and I can call these methods with keyboard presses as well and it works fine). So something is going on with OnClick, but I can't figure out what it is.

The scripts are is setup to work with both keyboard presses (to work on it in editor) and mouse/touch (for device testing and playing with the touch interface in editor). Please note, that I have tried disabling mouse / touch clicks on the Camera, it still happens twice on each click either way.

Any ideas or suggestions are appreciated.

53
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: March 11, 2014, 01:44:12 PM »
I would love to see embedded font size, embedded line spacing, embedded text alignment, and embedded font style.

54
NGUI 3 Documentation / Re: UILabel
« on: March 11, 2014, 02:05:37 AM »
I see, is that type of feature something that you think could be added someday? If not, would you happen to remember any of those addons that supported it by chance?

55
NGUI 3 Documentation / Re: UILabel
« on: March 10, 2014, 09:22:50 PM »
I was wondering if there was any way to have "multiple" text aligments in 1 UILabel (I'm guessing no). I know that I would accomplish this by using multiple labels, I just thought it would be nice if I could code this in 1 label.

Ex.
Blah blah lots of text explaining something, here is your score:(aligned left, clamp content)
Score (aligned center)
More text about something else (aligned left, clamp content)

56
NGUI 3 Support / Re: NGUI Buttons Jumping Around on LevelLoad
« on: March 08, 2014, 03:55:14 PM »
Having only 1 root in the scene seems to have fixed the problem, thank you both for the advice.

57
NGUI 3 Support / NGUI Buttons Jumping Around on LevelLoad
« on: March 08, 2014, 01:23:27 AM »
Hello everyone, I've got a strange problem I hope someone can help me sort out. I've recently added a Main Menu and Loading Screen setup to my project, but when the actual game scene loads...the NGUI layout for that screen is a mess (buttons have moved positions both in the panel and in world space), and I don't know why.

Presumably it has something to do either with loading the level (in my case a additive level load), or that for 1 frame when the loading script realizes that the additive content is done loading (since there are 2 ngui panels, 2 ngui cameras, 2 unity cameras, etc), the two systems do something strange to each other.

Has anyone heard of this happening before?

58
NGUI 3 Support / Re: Best Practices for Virtual Analog Stick(s)
« on: March 06, 2014, 01:32:16 PM »
Interesting, I'll give it a try, thank you for the advice.

59
NGUI 3 Support / Best Practices for Virtual Analog Stick(s)
« on: March 05, 2014, 03:07:40 PM »
Hello everyone,

I'm new to NGUI (and to UI in general), and I was hoping that someone could point me in the right direction when it comes to programming virtual analog sticks for touch devices.

With NGUI, the task of making a button draggable and having that button return seems easy enough (the components for that type of behavior are built in), but I was wondering how translating that movement into input for scripts was handled (say for moving a player around with that virtual analog stick). Off the top of my head, I suppose you could compare that current position of the analog stick to its starting position, and then take the difference and turn it into input a script could use (so if the stick is normally at say 0 0 0, if it was moved to 0 10(y) 0, the difference on Y would be positive and a script condition would be met and the player would start moving forward....or something like that).

So I was just wondering what the preferred method of getting input like this is when working with virtual analog sticks, any advice is appreciated.

Pages: 1 2 3 [4]