Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: qn9663 on September 04, 2013, 01:06:00 AM

Title: a bug on UICenterOnChild
Post by: qn9663 on September 04, 2013, 01:06:00 AM
   // change by qn
   // first center One GameObject
   // last void OnEnable () { Recenter(); } but mDrag.panel == null
   void OnEnable () { StartCoroutine(YieldStart());}
         
   //first OnEnable can't find mDrag.panel == null
   IEnumerator YieldStart(){
      yield return null;
      Recenter();
   }

   
Title: Re: a bug on UICenterOnChild
Post by: ArenMook on September 04, 2013, 04:12:14 AM
Why is it null? You might have a script execution order issue. Just set it to execute after the standard time.