Welcome,
Guest
. Please
login
or
register
.
October 12, 2024, 02:08:39 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIButton help pls (NGUI 3.4.8) ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: UIButton help pls (NGUI 3.4.8) ? (Read 1748 times)
PoN
Full Member
Thank You
-Given: 1
-Receive: 4
Posts: 111
UIButton help pls (NGUI 3.4.8) ?
«
on:
February 07, 2014, 06:59:36 AM »
How to set Notify field by code ? And why UIButton component being disabled after Play Unity ? I would like set Notify field to instantiated GameObject with UIButton component by code.
Logged
Worked on
Doc&Dog
,
Age Of Fury 3D
. Actually working on
WarMach
.
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UIButton help pls (NGUI 3.4.8) ?
«
Reply #1 on:
February 08, 2014, 02:13:48 PM »
The only reason UIButton would be disabled is if you have nothing for that button to color. You get a warning about it in the console log.
Use EventDelegate.Add to set the On Click notification from code:
UIButton btn
=
GetComponent
<
UIButton
>
(
)
;
EventDelegate
.
Add
(
btn
.
onClick
, YourClickFunction
)
;
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIButton help pls (NGUI 3.4.8) ?