Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fat Pug Studio on February 27, 2017, 04:43:15 PM

Title: Can't change Image Color via Set Float Value or Set Color RGBA/Value[SOLVED]
Post by: Fat Pug Studio on February 27, 2017, 04:43:15 PM
Hi,

i need to change the alpha of an image that's on the object childed under canvas. It contains rect transform, canvas renderer and Image (UnityEngine.UI.Image) itself.

I tried the following:

Getting the color and storing it under global color variable and changing it on runtime - it doesn't work.
Getting the color and storing it under global float variable and changing it - it doesn't work.

(http://s26.postimg.org/l2iay0yix/screenshot_19.png)

Source image is populated on runtime, of course.

It just doesn't get affected, any ideas?
Title: Re: Can't change Image Color via Set Float Value or Set Color RGBA/Value
Post by: terri on February 27, 2017, 07:13:19 PM
I just tried it and it works fine? Are you using the U Gui Graphic Get Color action?
Title: Re: Can't change Image Color via Set Float Value or Set Color RGBA/Value
Post by: Fat Pug Studio on February 28, 2017, 02:32:43 AM
No, just plain old get property/set float value

(http://s26.postimg.org/h9ysiaj0p/screenshot_21.png)
(http://s26.postimg.org/axjn8gfyh/screenshot_22.png)

and getting color and setting color rgba.

It works with U Gui graphic set color, thanks for that terri, but it puzzles me why simple property manipulation does not work. Goddamn UI.

Title: Re: Can't change Image Color via Set Float Value or Set Color RGBA/Value
Post by: terri on February 28, 2017, 04:57:00 AM
Hm, and I tried it and get/set property works for me.
I mean, in your shot it seems to return 1, which is the full value? (its on a 0-1 scale)
Title: Re: Can't change Image Color via Set Float Value or Set Color RGBA/Value SOLVED
Post by: Fat Pug Studio on February 28, 2017, 08:47:15 AM
Oh don't mind the values, they're not on runtime. It gets 1, but it sets 0, unfortunately, though it says 0 in the field, nothing happens on the color picker itself. Funny, ain't it ???

Or maybe it's just one of my 1AM bollocks where i unknowingly messed up something.

Thanks once again terri, marked as solved!