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

Pages: [1]
1
NGUI 3 Support / Re: How can I manually cancel drag of UIDragDropItem?
« on: August 22, 2014, 05:35:33 AM »
Thanks a lot ^)

2
NGUI 3 Support / How can I manually cancel drag of UIDragDropItem?
« on: August 21, 2014, 07:05:48 AM »
Clearing following things will do nothing
  1. UICamera.currentTouch.dragStarted = false;
  2. UICamera.currentTouch.pressed.SendMessage("OnPress", false);
  3. UICamera.currentTouch.pressed.SendMessage("OnHover", false);
  4. UICamera.currentTouch.pressed = null;
  5. UICamera.currentTouch.dragged = null;
  6. UICamera.currentTouch.current = null;
  7. UICamera.currentTouch = null;

3
NGUI 3 Support / Re: UITweener.onFinish not calling
« on: July 30, 2014, 03:27:54 AM »
Got any ideas?

4
NGUI 3 Support / Re: UITweener.onFinish not calling
« on: July 28, 2014, 03:54:44 AM »
My question is, why do you have one OnFinished being called from inside of another?
I think it is multi-thread rendernig, but... it's happened and when MTR off.. or "new" tween already has finihed...

5
NGUI 3 Support / Re: UITweener.onFinish not calling
« on: July 28, 2014, 03:52:25 AM »
For example.. http://gyazo.com/ecc84ea729dfda30843d122fe207b19e
"Me" - Tween was firing onFinish.. "Current" - UITweener.current;

CallStack:

Me: UI Root (2D).GameUIGroup.GUIPanel.GameField.PlayerField8.Face.AvatarClipPanel.AnimGroup.AnimRoot.AnimTake.AnimTable.CardSprite.ShadowSprite.ShadowSprite (TweenAlpha)
Current: UI Root (2D).GameUIGroup.GUIPanel.GameField.PlayerField8.Face.AvatarClipPanel.AnimGroup.AnimGroup (TweenPosition)

UnityEngine.Debug:LogWarning(Object)
UITweener:Update() (at Assets/Plugins/Library/NGUI/Tweening/UITweener.cs:310)
UITweener:Play(Boolean) (at Assets/Plugins/Library/NGUI/Tweening/UITweener.cs:491)
UITweener:PlayForward() (at Assets/Plugins/Library/NGUI/Tweening/UITweener.cs:469)
AnimTakeController:OnTransitionFinished() (at Assets/Plugins/Controllers/AnimTakeController.cs:47)
EventDelegate:Execute() (at Assets/Plugins/Library/NGUI/Internal/EventDelegate.cs:235)
EventDelegate:Execute(List`1) (at Assets/Plugins/Library/NGUI/Internal/EventDelegate.cs:302)
UITweener:Update() (at Assets/Plugins/Library/NGUI/Tweening/UITweener.cs:274)

AnimTakeController:OnTransitionFinished() code
  1. public void OnTransitionFinished()
  2.     {
  3.         if (!CanNextAnimationPlay)
  4.             return;
  5.         _cardCount = 0;
  6.         _isMePlayNow = true;
  7.         var tweens = GetComponentsInChildren<UITweener>(true);
  8.         foreach (var tween in tweens.Where(tween => !(tween is TweenTimeAction)))
  9.         {
  10.             tween.PlayForward();
  11.         }
  12.         GetComponent<AnimDeckTopController>().StartDeckTopAnim();
  13.     }

6
NGUI 3 Support / UITweener.onFinish not calling
« on: July 27, 2014, 07:17:04 PM »
In some cases, when we are have many UITweens in scene, onFinish callbacks not firing.
Problem: UITweener.cs, line 214
  1. if (current == null)
- ignore the callback's code part from "new", when another ("current") tween is finished. And no matter - has "current" onFinished callbacks or not. When I remove this check (and then fully remove it, just save "current" to "temp", set "current"="new" call onFinished, and then restore "current"="temp") issue has fixed.. but.. I did't like this fix, because "current"  maybe used in onFinished and will crash code loginc in same case.

This only one way to fix this issue normally, in my opinion: delete static field UITweener.current and send onFinished events with sender's "this" parameter, like
  1. onFinished.call(this)

Sorry, if my English is not well.

P.S. NGUI 3.6.8

Pages: [1]