Author Topic: NGUITools.AddChild() prefab size  (Read 3105 times)

Majicpanda

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
NGUITools.AddChild() prefab size
« on: January 06, 2013, 11:57:15 PM »
Is it not proper to create an empty GameObject in your NGUI hierarchy to easily group items so that they can be prefab'd?  When using AddChild(gameObject, prefab) and the gameObject is localScale 1,1,1 the prefab inherits this upon being instantiated.

Feel like I'm probably doing this incorrectly... any ideas?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUITools.AddChild() prefab size
« Reply #1 on: January 07, 2013, 09:06:54 AM »
The scales of all game objects leading up to your widgets should be (1, 1, 1) anyway (UIRoot excluded). If you're creating a prefab out of something, create a prefab out of a parent game object, not a widget itself.