Author Topic: UITable/UIGrid + 3d camera  (Read 1354 times)

duncanfoo

  • Guest
UITable/UIGrid + 3d camera
« on: October 25, 2013, 02:53:30 PM »
I've been trying to use a UITable in a panel attached to a 3d UI camera. When I AddChild the prefab and subsequently call Reposition on the table the added widget is not in the correct location (its at the bottom of the screen with some very strange Z values).

Am I doing something wrong, or is it not possible to use a UITable (or UIGrid) with a 3d camera?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITable/UIGrid + 3d camera
« Reply #1 on: October 26, 2013, 10:05:46 PM »
Table and grid has nothing to do with the type of camera used to draw them. Grid uses only the cell width and height you specified, and table uses the dimensions of each of the content items. Off the top of my head I don't remember whether the Z value is kept or not, but since you said you use AddChild, it should be set to zero anyway.

duncanfoo

  • Guest
Re: UITable/UIGrid + 3d camera
« Reply #2 on: October 28, 2013, 06:03:21 AM »
I got this working by manually placing the table in the parent widget. I think my problem was due to the anchoring setup I had.