Author Topic: UIInput eventReceiver goes null  (Read 3344 times)

rchavarria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
UIInput eventReceiver goes null
« on: April 19, 2013, 04:16:17 PM »
I'm hitting a problem that is driving me crazy.

I have a chat system, and I use UIInput to capture text and then send it.

Crazily enough, after the 6th message is sent, the Event Receiver on the UIInput gets set to null, and I can't find a reason why this is happening.

Is NGUI doing any type of cleanup or destroying something that would cause this to happen?

Thanks,
- Ricardo

rchavarria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: UIInput eventReceiver goes null
« Reply #1 on: April 19, 2013, 04:25:53 PM »
Ok, some further info tells me that UIInput's Init is being called on the 6th time I enter text on the input field. Is there a reason why this would happen?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput eventReceiver goes null
« Reply #2 on: April 19, 2013, 11:23:29 PM »
No reason this would happen unless you're calling Init yourself via a Broadcast or SendMessage. Init is called only once.