Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: zeeawk on June 16, 2014, 04:12:13 AM

Title: Spawn UIScroll View
Post by: zeeawk on June 16, 2014, 04:12:13 AM
I'm trying to spawn a UIScroll View next to one of my game objects. Kind of like a popup menu that would appear when the object is clicked.
I created a prefab for it but am having a hard time getting it to display properly. Can anyone point me to some code that can help?
Title: Re: Spawn UIScroll View
Post by: ArenMook on June 16, 2014, 08:36:58 AM
NGUITools.AddChild(parent, prefab);
Title: Re: Spawn UIScroll View
Post by: zeeawk on June 16, 2014, 09:49:23 AM
I just tried that but it spawns it extremely large. How can I spawn it the correct size and position it?
Title: Re: Spawn UIScroll View
Post by: zeeawk on June 17, 2014, 12:54:20 AM
NGUITools.AddChild(parent, prefab);

Should the parent be my object on screen I want it to spawn next to or does the parent need to be in the UI Root?
Title: Re: Spawn UIScroll View
Post by: ArenMook on June 17, 2014, 01:31:21 PM
Parent object must be some object in your UI hierarchy.