Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: asimarif on January 23, 2013, 05:36:52 AM
Title:
How to items in UIGrid on the Fly
Post by:
asimarif
on
January 23, 2013, 05:36:52 AM
Hi,
I have a prefab which I would like to add in the Grid. Can someone please share me a code for this because I'm really unable to do this... :(
Thank you!
Title:
Re: How to items in UIGrid on the Fly
Post by:
PoN
on
January 23, 2013, 06:42:37 AM
public
UIGrid refGrid
;
public
GameObject your_prefab
;
private
void
YourMethod
(
)
{
GameObject currObj
=
NGUITools
.
AddChild
(
refGrid
.
gameObject
, your_prefab
)
;
refGrid
.
repositionNow
=
true
;
}