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.


Topics - blitzer

Pages: 1 [2]
16
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.

17
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.

18
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?

19
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]