Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: TiggersDaMan on December 04, 2014, 02:59:56 PM

Title: HowTo add GameObjects and have them scaled automatically to fit UI
Post by: TiggersDaMan on December 04, 2014, 02:59:56 PM
For the life of me, this seems like it should be simple, but I haven't been able to find the answer.

I am using NGUI extensively with many features, with one of them being a custom inventory system.

I want to instantiate, or add a child to the UI a 3D prefab of the inventory item and spin it, and just need way to have the items scaled automatically to fit the UI space. For example there's a huge size difference between a staff and a potion, so scaling is required. I prefer not to make yet another prefab of every inventory item just to fit in the UI.
Does anybody know a way this can be done?
Title: Re: HowTo add GameObjects and have them scaled automatically to fit UI
Post by: ArenMook on December 05, 2014, 12:59:58 AM
You can adjusts the transform of any widget just like any other game object.