Author Topic: UICamera.currentTouch getting null  (Read 2011 times)

pawankumar113

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 11
    • View Profile
UICamera.currentTouch getting null
« on: December 17, 2014, 03:07:26 AM »
I am using UICamera.currentTouch.pos in my own function but i am getting null exception.
I don't know why.

Any help will be appreciated.
Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICamera.currentTouch getting null
« Reply #1 on: December 17, 2014, 03:20:14 PM »
Because UICamera.currentTouch is only valid during NGUI event callbacks, such as OnPress, OnClick, etc.