Author Topic: UIGrid objects being offset by huge value  (Read 3009 times)

Cwal

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
UIGrid objects being offset by huge value
« on: October 23, 2013, 06:23:14 PM »
I have a set up that instantiates new objects to be placed in a grid.  I changed which scene the prefab was placed in, and now when the grid is generated everything is offset by 1000 units in the z axis, which means that everything is out of the view.  I can't find any difference between the two scenes to explain the difference, or what is happening in the instantiation code that could be causing it.  If I move them in play mode, they move back when the grid is moved.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid objects being offset by huge value
« Reply #1 on: October 23, 2013, 09:55:32 PM »
Check the Z position of all the game objects leading up to your instantiated objects, and make sure you use NGUITools.AddChild to instantiate it, not Object.Instantiate.