playMaker

Author Topic: Set property (Toggle) Color Multiplier [SOLVED]  (Read 2154 times)

CogBliZ

  • Playmaker Newbie
  • *
  • Posts: 3
Set property (Toggle) Color Multiplier [SOLVED]
« 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
« Last Edit: February 18, 2016, 02:33:45 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: Set property (Toggle) Color Multiplier
« Reply #1 on: February 17, 2016, 04:30:59 PM »
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...

CogBliZ

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Set property (Toggle) Color Multiplier
« Reply #2 on: February 17, 2016, 09:37:21 PM »
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.
« Last Edit: February 17, 2016, 09:41:56 PM by CogBliZ »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set property (Toggle) Color Multiplier
« Reply #3 on: February 18, 2016, 01:38:48 AM »
Hi,

 There is a getter and setter custom action within the uGui Package ( found on the Ecosystem)

uGuiSetBlockColor
uGuiGetBlockColor

I think this will hold all the properties needed, let me know if there are missing ones.

Bye,

 Jean

CogBliZ

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Set property (Toggle) Color Multiplier
« Reply #4 on: February 18, 2016, 03:59:08 AM »
Hi Jean!

Worked like a charm with the uGuiSetBlockColor. Thank you very much :)
« Last Edit: February 18, 2016, 04:00:46 AM by CogBliZ »