Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: CogBliZ on February 17, 2016, 03:00:48 PM
-
Hi there!
I am currently creating a game where I am in need of changing the color multiplier on a toggle (Script) and I have set up a Object with the "UnityEngine.UI.Toggle" and I am now looking to set property "color multiplier" which is a float. But I cannot seem to find it in the property tab. I have tried the graphic -> color -> item, but nothing seems to work. Can anyone point me in the right direction here?
Thank you!
CogBliZ
-
It looks like that property is stored inside a ColorBlock that is not accessible to Set Property.
I'll investigate if there's a way to let Set Property drill into a ColorBlock, but in the meantime you will probably need a custom action. Or maybe there's one on the Ecosystem for this already... I'll ask Jean to look into this...
-
Hi Alex,
Thank you for the quick reply =)
I was afraid that it was not accessible, I could not find anything in the ecosystem and I am not entirely sure how to setup a custom action, but I think I found a workaround that I may use, where I turn the toggle on and insert the image in graphic. I was using the toggle as a unlock function where it is grayed out as default, and I was going to just use the color multiplier to make it not grayed out when you had enough points for the unlock. I know this may not be the best way to do this, and there is probably other ways that are better :P Like making a grayed out image through photoshop and just swapping sprites.
-
Hi,
There is a getter and setter custom action within the uGui Package ( found on the Ecosystem (http://j.mp/1Esn1mF))
uGuiSetBlockColor
uGuiGetBlockColor
I think this will hold all the properties needed, let me know if there are missing ones.
Bye,
Jean
-
Hi Jean!
Worked like a charm with the uGuiSetBlockColor. Thank you very much :)