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

Pages: [1]
1
Hi,

I recently upgraded the project to v3.11.3 with no other custom code changes. This issue has popped up where an item is being moved and the gameobject is no longer under the mouse but is moving all over the place. It gets dropped on wherever the mouse cursor is when released.

I havent changed anything else, except upgrade NGUI from v3.7 to 3.11.3. Any pointers will be much appreciated.

Thanks

2
NGUI 3 Support / UIInput and Controller Joystick going berserk
« on: October 13, 2014, 05:56:37 PM »
Hi,

I am porting a perfectly working Unity-NGUI game to Ouya and am running into issues with UIInput using a controller.

The joystick navigation works fine on the main menu with half a dozen buttons. (using UIKeyNavigation on each button)

But it breaks on the signup and login forms.
The Login form is very simple with 4 widgets, each with UIKeyNavigation: email (Starts Selected), password, cancel and submit buttons.

1. Once the keyboard is closed, the UIInput was setting isSelected=false which sets the UICamera.selectedObject to null and UIKeyNavigation was no longer working. I uncommented that line so that when the keyboard is closed, the input is still selected and I can use the joystick to move to the next element.

2. But with the change in #1, after entering data in any input field using the on-screen Ouya keyboard, moving the (left) joystick up or down freezes the axis value without returning it to zero (accounting for the dead zone). This is then interpreted as move-up or move-down by UICamera and it cycles through each form field - bringing up the keyboard, closing it, moving to the next field, bringing up the keyboard (if its an input field) etc.. until move the joystick in several ways to stop the cycle.

I noticed a comment in UIInput.cs that says:
// Unity has issues bringing up the keyboard properly if it's in "hideInput" mode and you happen
// to select one input in the same Update as de-selecting another.

And I checked my 2 inputs that they are not set to "Hide Input".

I am so close to wrapping this game and am stuck with this form issue.
I'd really appreciate any help/guidance.

Thanks
Usha

3
Hi,

I am trying to port a fully working NGUI game to Ouya and running into some murky waters.
From some of the Ouya reference posts on this forum, I tried using CustomInput for the UICamera like so:

UICamera.onCustomInput += OuyaInput;

And in the function, I am able to capture the controller button clicks and axis values.

I am a little lost as to
1. how to translate the axis values and button clicks (say O-button click) so NGUI can set the UICamera.selectedobject and trigger OnPress/OnDrag etc.

2. if this needs to be added to every single button and object in the game which works with drag-drop or if I can have a central script that can interface with NGUI.

3. I noticed the Input.GetKey and Input.GetAxis are function pointers in UICamera. Can they be overridden to get data from Ouya in that environment?

Any help is much appreciated.

4
NGUI 3 Support / Fixing Aspect Ratio and Mouse Position
« on: September 04, 2014, 06:13:23 PM »
Hi,

I am relatively new to Unity and NGUI and am struggling with setting up the UI for multi-resolution/multi-aspect ratio devices.

The UI is now built for 16:9, using assets sized appropriately for 2560x1442.
To use it on 4:3 devices, I understand there are 3 options:
  • Using NGUI's Anchor and Stretch system, adjust the entire GUI.
  • Use different scenes for different aspect ratios along with different assets and dynamically show the scenes at run-time based on the device
  • Make the 16:9 show on 4:3 devices with black bars on top.

Since both are quite time-consuming to redo the whole thing at this point, considering #3, I came across AspectUtility in the forums that adjusts the Camera's Viewport rect which visually works just fine.

However, dragging objects around makes the mouse cursor move separately from the object being dragged.

Would appreciate any help and direction with this issue.
Thanks

5
NGUI 3 Support / 'Shuriken Magic' Effects and NGUI
« on: February 20, 2014, 01:56:08 PM »
Hi,

I have had some success building our game with NGUI and now I am trying to add effects but falling flat. I purchased the Shuriken Magic Effects pack from the Asset store but they dont seem to be playing nice with NGUI. Both these assets appear to be quite popular, so has anybody else run into similar issues?

1. Attached are the images of what I see in my scene with NGUI camera (solid red) for the axe vs. the image in their demo. I would guess it has something to do with the Shader since the other effects using the same shader also appear in solid color unlike the effects in their demo.
However, they look fine if I add them to a new scene with Unity's camera. Could anyone point me to what the Shader could be interfering with NGUI?

2. All the effects seem to be as if looking from the side when using NGUI's camera vs. looking from the top with Unity's camera since I can adjust the position. I tried changing the Render Queue as mentioned in this post: http://www.tasharen.com/forum/index.php?topic=2247.0 but no luck. If I change the Z-value, to push them back, it does not seem to be making any difference either. Is the NGUI camera working only in X-Y ?

I'd really appreciate if anyone can point me in the right direction.

Thanks

6
NGUI 3 Support / UIDragDropItem and OnTriggerEnter for object underneath
« on: February 13, 2014, 06:13:33 PM »
Hi,

I am new to Unity and NGUI but figured out quite a bit in the last few days. However I am struggling with the following scenario:

I have a Prefab with a Box Collider, RigidBody and UIDragDropItem setup, that I can move around the scene and drop on the UIDragDropContainer(also with a Box Collider).

Now, there are several of these UIDragDropContainers and I am trying to highlight the one currently beneath the object that is moving.
It looks like with the UIDragDropItem on the prefab, the OnTriggerEnter/OnCollisionEnter is not working. I understand that NGUI detects collisions with Raycasting, so do I need to enable Unity's Main Camera (currently deleted) for OnTrigger/OnCollision events to work?

Any help is much appreciated.
Thanks.

Pages: [1]