Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - stran25

Pages: [1]
1
NGUI 3 Support / Re: UIGRID Reposition Crashing?
« on: July 13, 2014, 10:36:36 AM »
Ok thanks. And just one more question does the grid get sorted every time reposition is called and if so Does that mean my custom sort function is being called as well?

2
NGUI 3 Support / Re: UIGRID Reposition Crashing?
« on: July 11, 2014, 11:37:51 AM »
This is my code where I add the children but every time I try to call grid.GetComponent<UIGrid>.Reposition(); Unity crashes. I also have tried just calling grid.GetComponent<UIGrid>().Reposition(); after adding all the children but that still doesn't work. I also tried this on another computer just to make sure it wasn't my computer. I am basically trying to create a leaderboard and maybe I am approaching this the wrong way and when you call reposition does it also sort the children?

  1. foreach(int k in totals.Keys)
  2.                 {
  3.                         leaderboardsprite.name = totals[k];
  4.                         //leaderboardsprite.transform.FindChild("Label").GetComponent<UILabel>().SetDimensions(200,25);
  5.                         leaderboardsprite.transform.FindChild("Label").GetComponent<UILabel>().text = totals[k]+"      "+k.ToString();
  6.                         NGUITools.AddChild(this.gameObject,leaderboardsprite);
  7.                         Debug.Log("initialize");
  8.                         grid.GetComponent<UIGrid>().Reposition();
  9.                 }

3
NGUI 3 Support / Re: UIGRID Reposition Crashing?
« on: July 09, 2014, 06:29:40 PM »
I am generating the children of the uigrid dynamically through code. I have tried calling reposition() after I have added a child to the grid and I have also tried calling reposition() after all children have been added to the grid but it keeps freezing/crashing. And also in order to add a child am I supposed to use NGUITools.AddChild() or am I supposed to be using UIGrid.AddChild();

4
NGUI 3 Support / UIGRID Reposition Crashing?
« on: July 09, 2014, 03:52:11 PM »
I was wondering if anyone has had any problems when you call reposition on the uigrid because right now when I call reposition it keeps freezing/crashing the unity editor.

Thanks for the help in advance.

Pages: [1]