Welcome,
Guest
. Please
login
or
register
.
February 10, 2025, 11:33:31 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UITexture doesn't repainting
« previous
next »
Print
Pages: [
1
]
Author
Topic: UITexture doesn't repainting (Read 2299 times)
PoN
Full Member
Thank You
-Given: 1
-Receive: 4
Posts: 111
UITexture doesn't repainting
«
on:
February 17, 2014, 02:53:50 AM »
Hi Aren, I use UITexture with material which has my own shader, then i change params , like these :
material
.
SetColor
(
"_BrdColor"
,
....
material
.
SetColor
(
"_BGColor"
,
...
material
.
SetColor
(
"_FGColor"
,
...
but UITexture not update or not repainting , and only repainting (display with new params) when i click on UIInput or click on UIPopupList or just disable-enable UITexture component, why? what'w wrong?
P.S. that had been coming from NGUI 2.7 vers.
«
Last Edit: February 17, 2014, 03:26:30 AM by PoN
»
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: UITexture doesn't repainting
«
Reply #1 on:
February 17, 2014, 11:16:46 AM »
NGUI makes a copy of the material. Use texture.drawCall.dynamicMaterial.SetColor instead.
Logged
PoN
Full Member
Thank You
-Given: 1
-Receive: 4
Posts: 111
Re: UITexture doesn't repainting
«
Reply #2 on:
February 17, 2014, 09:15:16 PM »
yes, it's work, but,but ,but..have found new bug, if i have changed "params" that UITexture has repainted and then if i tap/click on UIInput widget on a same panel, that UITexture "params" is reset to initial "params" .
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: UITexture doesn't repainting
«
Reply #3 on:
February 18, 2014, 10:05:38 AM »
Without knowing how your UITexture is used I can't tell you why an input field would affect it, but I suppose you can also just set the color on both the material and the dynamic material.
Also, I'd suggest you not use material properties if you can simply use shader globals (Shader.SetGlobalColor).
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UITexture doesn't repainting