Welcome,
Guest
. Please
login
or
register
.
April 20, 2026, 05:18:38 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to items in UIGrid on the Fly
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to items in UIGrid on the Fly (Read 2592 times)
asimarif
Guest
How to items in UIGrid on the Fly
«
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!
Logged
PoN
Full Member
Thank You
-Given: 1
-Receive: 4
Posts: 111
Re: How to items in UIGrid on the Fly
«
Reply #1 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
;
}
Logged
Worked on
Doc&Dog
,
Age Of Fury 3D
. Actually working on
WarMach
.
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to items in UIGrid on the Fly