playMaker

Author Topic: getting a material color[SOLVED]  (Read 2397 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
getting a material color[SOLVED]
« on: July 16, 2014, 09:54:44 AM »
Is there a way to get the color of a material, store it and then set it as the color of another material?
« Last Edit: July 16, 2014, 12:24:54 PM by Splankton »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 715
    • Flashing Lights
Re: getting a material color
« Reply #1 on: July 16, 2014, 11:02:19 AM »
Hi, search for "Material" in actions browser.
There are get/set Material/Material.Color

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: getting a material color[SOLVED]
« Reply #2 on: July 16, 2014, 12:12:45 PM »
Yea, I'm aware of all the actions, but I need to get the _Color property from a material.  I can set a color, but not get a color.

Ah just found Jean's GetMaterialColor action. Should've searched 1st.
« Last Edit: July 16, 2014, 12:22:38 PM by Splankton »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 715
    • Flashing Lights
Re: getting a material color
« Reply #3 on: July 16, 2014, 12:21:02 PM »
Try creating an Object variable and set it to UnityEngine>Material
Use Get Material action, store it in that variable
and then Get Property>Color


Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: getting a material color[SOLVED]
« Reply #4 on: July 16, 2014, 12:25:24 PM »
Thanks for the help ;)