Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Sahkan on August 17, 2014, 06:17:08 AM

Title: Delegate onKey doe's not work.
Post by: Sahkan on August 17, 2014, 06:17:08 AM
  1. void Awake()
  2.         {
  3.                 UIEventListener.Get(laterInputField.gameObject).onKey += laterInputField_Typed;
  4.         }
  5.  
  6. void laterInputField_Typed(GameObject go,KeyCode key)
  7.         {
  8.                 print ("laterInputField_Typed");
  9.         }
  10.  

This example won't print anything, and i'v checked, the other delegates are working fine .
I'm working from version 3.5.3 and i can't upgrade at the moment, so maybe a piece of missing code or something that can fix it will be very appreciated. Thanks.
Title: Re: Delegate onKey doe's not work.
Post by: Sahkan on August 17, 2014, 07:47:52 AM
Ok i'v used this and it works  :) :

EventDelegate.Set(laterInputField.onChange, LaterInputField);