Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: sgstester on June 22, 2014, 02:35:42 AM

Title: UIGrid AddChild function not work in version 3.6.5
Post by: sgstester on June 22, 2014, 02:35:42 AM
Hi,

Today i upgrade my NGUI to 3.6.5, before that, everything work well in my project, i'm using function addchild(transform, index), after upgraded, it doesn't work anymore, i tried to debug using getchild function after addchild to grid and see that it return nothing, so that mean u changed somethings in uigrid and now it have problem, plz check it and update soon
Title: Re: UIGrid AddChild function not work in version 3.6.5
Post by: ArenMook on June 22, 2014, 10:58:48 PM
Don't use this function. You can't insert objects into the grid properly because there is no way to insert an object in the transform's list of children that the UIGrid relies on. This feature is going to be possible in Unity 4.6 (that's when Unity is adding support for it).

To add a child to the grid, simply set its transform.
  1. yourObject.transform.parent = grid.transform;