Author Topic: Grids and positioning  (Read 2350 times)

Darkness

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 90
    • View Profile
Grids and positioning
« on: April 26, 2015, 10:44:51 AM »
I've been trying to get my NGUI grids to line up properly and they simply refuse.  Every time I add something to the grid it always ends up in some strange position.  If I try to manually set the position, the items end up positioned in space.  I have some very strict locations I want new items added to the list to end up and I can't get them there.  Anyone know what I can do to do this?  Do I need to use something other than UIGrid for my Scrollview list?  What I'm trying to do doesn't seem like it should be so hard, but it's really driving me crazy.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grids and positioning
« Reply #1 on: April 27, 2015, 04:33:27 PM »
Post some code, it may help. Assuming you use NGUITools.AddChild to do your instantiation, the object will have a local position of (0, 0, 0) by default. Calling ResetPosition() on the grid after instantiating everything will change the positions properly.

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: Grids and positioning
« Reply #2 on: May 04, 2015, 12:58:26 AM »
I've been trying to get my NGUI grids to line up properly and they simply refuse.  Every time I add something to the grid it always ends up in some strange position.  If I try to manually set the position, the items end up positioned in space.  I have some very strict locations I want new items added to the list to end up and I can't get them there.  Anyone know what I can do to do this?  Do I need to use something other than UIGrid for my Scrollview list?  What I'm trying to do doesn't seem like it should be so hard, but it's really driving me crazy.

Yeah, i m agree with author post, UIGrid and UITable always give some trouble and problems using them with ScrollView, always need to control by ResetPositions or Repositions, or something else. Sometimes looks different on the mobile devices than Unity editor, really tired. Aren pls try to do better way implement this. thanks.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.