Author Topic: Bug 3.7.1 UISlider when OnPressForeground  (Read 2550 times)

nunteng21

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 4
    • View Profile
Bug 3.7.1 UISlider when OnPressForeground
« on: August 26, 2014, 01:10:57 PM »
UISlider

added code

mCam = UICamera.currentCamera;

My fix:
  1. protected void OnPressForeground (GameObject go, bool isPressed)
  2. {
  3.         if (UICamera.currentScheme == UICamera.ControlScheme.Controller) return;
  4.          mCam = UICamera.currentCamera;          << added code
  5.          if (isPressed)
  6.          {
  7.                mOffset = (mFG == null) ? 0f :
  8.                value - ScreenToValue(UICamera.lastTouchPosition);
  9.          }
  10.         else if (onDragFinished != null) onDragFinished();
  11. }
  12.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug 3.7.1 UISlider when OnPressForeground
« Reply #1 on: August 27, 2014, 04:15:35 AM »
That seems fine to me, thanks.