Welcome,
Guest
. Please
login
or
register
.
May 17, 2025, 11:26:55 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Label issue
« previous
next »
Print
Pages: [
1
]
Author
Topic: Label issue (Read 2330 times)
yuyaokada
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 5
Label issue
«
on:
June 06, 2014, 05:30:33 AM »
How can I change text size without changing transform.localScale?
Logged
Rajken
Newbie
Thank You
-Given: 1
-Receive: 2
Posts: 12
Re: Label issue
«
Reply #1 on:
June 06, 2014, 06:14:38 AM »
You will need to get the UILabel component and then set the fontSize if you want to do it from the code
else you can set it in the editor after you have selected a font to use for that label.
Logged
yuyaokada
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 5
Re: Label issue
«
Reply #2 on:
June 06, 2014, 06:28:14 AM »
I wrote following code but I got an error " 'fontSize' is not a member of 'UILabel' ".
GameObject obj;
obj.GetComponent<UILabel>().fontSize = 0;
Logged
Caio.Lib
Newbie
Thank You
-Given: 7
-Receive: 2
Posts: 26
Re: Label issue
«
Reply #3 on:
June 06, 2014, 10:20:51 AM »
yuyaokada
, which is version of NGUI are you using?
This code works for me:
gameObject
.
GetComponent
<
UILabel
>
(
)
.
fontSize
=
0
;
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Label issue