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

Pages: [1]
1
I think I have encountered the same issue, it's probably due to default button state getting alpha=0 in some situations (alpha changed before button init?) Anyway workaround for me was to use button.SetState(UIButtonColor.State.Normal, true) before any tweening (ie. alpha has to be still 1 when calling that).

Thank you Gwl. That sounds right. Mine starts at alpha 0 and tweens to 1 for a fade-in effect. Where did you put that statement? Did you create a custom script or add it in to one of the existing ones?  I haven't worked with NGUI much other than the standard, built-in stuff and even with that stuff it's been awhile.  Thanks for your help.

2
I have 4 UIButtons on a menu.  They all use alpha tween to appear on the home screen of my app.  In play mode, the last button "Help" disappears upon exiting onHover (i.e., it's still there during onHover but as soon as the mouse is moved, it disappears and will not return even if I move the mouse back over).  When publishing a test build to an iPad Air 2 running iOS 8.1.2, the Help button disappears after tapping.  I looked through the attributes of all buttons and they all look the same, but only the help button exhibits this behavior.

There is something else happening which I'll mention since it may be related. When a button is clicked, I overlay a sprite (which acts a page in the app) on top of the menu. When I go to one of these pages, I can see the buttons faintly in the background.

I am working on an update of my app and I checked the published version on the same iPad and there is no trace of this problem (i.e., everything works as expected).  The published version was running NGUI 3.5.1 and Unity 4.3.4, I believe. For the update, I am running Unity 4.6.2 and NGUI 3.8.

Any help is greatly appreciated - I'm trying to get this published for an event which is in a week and still will need to submit and get approval from Apple, so I need to fix this asap.  Thanks.

3
Thank you - this led me to the fix.

4
NGUI 3 Support / Re: Tweens, Anchors and other Joys...
« on: February 26, 2014, 01:30:38 PM »
I just ended up going with tween alphas so that I could keep them anchored and stretching in all environments.

Now, though, I'm having an issue where the first 3 menu buttons tween in together (Tween Alpha from 0 to 1), while the 4th button seems to lag behind.  The menu is the first thing to come up when the app launches.  So, the way this presents itself is that when the app launches, the first 3 buttons go to alpha 0 before they ever appear (which is exactly what I want), while the forth button is visible (alpha 1) for a second before going to alpha 0.  It finishes it's tween, as desired, with the other 3 buttons.  I have deleted the 4th button and recreated it both from scratch and by duplicating the other buttons, but can't get it to work.  If I add a 5th button, it does the same thing as the 4th.  Any ideas what could be causing this?  Thanks for your help.

5
NGUI 3 Support / Re: Tweens, Anchors and other Joys...
« on: February 23, 2014, 06:27:13 AM »
Thanks for adding this. I have a couple of questions:

1.  How do I set the from and to under tween position so that they are relative like the anchor numbers?  I'm trying to have the menu items move in from the right and have the right edge of the button line up with the right edge of the screen.

EDIT: just to be clear, I'm able to do this for any one device, just not all of them since the xyz is different for each device.

I am also using this for a menu, but was would like to have a delay between each tween. Is there a way to do this?  If I use the standard start delay in the tween position script, the button stays at it's anchor point at the right edge of the screen and, after the delay, starts it's tween. That makes sense, but I'm wondering how to go about getting around it.  Any help is appreciated.

6
NGUI 3 Support / Argumentexception: couldn't bind to method play
« on: February 22, 2014, 11:26:51 PM »
Hi,

Using NGUI 3.4.9 and Unity Pro 4.3.1f1. I've been working without a problem the last couple of days, but now am getting a Argumentexception: couldn't bind to method 'Play' error.

The error comes up when I click a button which invokes a tween alpha on a sprite which has this hierarchy:

Sprite
-button
-scrollview
--grid
---empty widget1 (collider, UIDrag Scroll View, UICenter on Click)
----label
----label
---empty widget2 (collider, UIDrag Scroll View, UICenter on Click)
----label
----label

The last thing I did before I got this error, was to change the font on a label under empty widget1.

Here is the console output:

  1. System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Delegate.cs:351)
  2. System.Delegate.CreateDelegate (System.Type type, System.Object target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Delegate.cs:397)
  3. System.Delegate.CreateDelegate (System.Type type, System.Object target, System.String method, Boolean ignoreCase) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Delegate.cs:406)
  4. System.Delegate.CreateDelegate (System.Type type, System.Object target, System.String method) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Delegate.cs:300)
  5. EventDelegate.Get () (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:154)
  6. EventDelegate.Execute () (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:219)
  7. EventDelegate.Execute (System.Collections.Generic.List`1 list) (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:293)
  8. UIButton.OnClick () (at Assets/NGUI/Scripts/Interaction/UIButton.cs:120)
  9. UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
  10. UICamera:Notify(GameObject, String, Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:794)
  11. UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1463)
  12. UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1092)
  13. UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1162)
  14. UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:939)

Any help would be greatly appreciated.

Pages: [1]