Author Topic: UIGrid arrangement problem.  (Read 3521 times)

patrick_activate

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
UIGrid arrangement problem.
« on: March 19, 2014, 10:10:16 PM »
i dynamically spawn UIlabel and UITexture objects (as child) into a UIGrid object, the result i want to acheive is the items in the grid arranged randomly, but the result i get was like this:

the UIlabel objects seems automatically arranged to the left, i am pretty sure my random algorithm are working correctly, as a prove there is the debug log for above case:


what is the possible reason of causing this? i am sure i dint tick the "Sorted" option in UIGrid

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid arrangement problem.
« Reply #1 on: March 20, 2014, 12:58:47 AM »
What is the grid's sorting set to?

patrick_activate

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: UIGrid arrangement problem.
« Reply #2 on: March 20, 2014, 10:18:33 PM »
thankyou for replying, i think i spotted the problem, unity automatic sort the child of the grid according to the object's name, thats why my "L"abelObject is infront of my "T"exture Object