Hi, Aren, I'm using paid version of NGUI and this is my first question here (so far I have been able to find all answers in existing posts).
I have empty UITable which I fill with prefab like this:
var cardGO = NGUITools.AddChild(CardSelectTable.gameObject, CardPrefab); //Yes, only one object
The UITable settings are set to make its content centered. So I expect the position of inserted GameObject to be 0,0,0.
Instead I get strange non symmetrical shifts in position of inserted GameObject (like 70, -125, 0).
But after I do this
while (CardSelectTable.gameObject.transform.childCount > 0){
NGUITools.Destroy(CardSelectTable.gameObject.transform.GetChild(0).gameObject);
and fill the table next time I get position right (0,0,0).
I want to understand what NGUITools.Destroy really does with UITable and do the same thing manually before first instantiation of prefab to eliminate undesired position shifts.
P.S. I don't know it it's important, but at run I always have UITable script disabled (although it's enabled at start and I'm not changing its state in code).