playMaker

Author Topic: need help getting material name  (Read 1178 times)

ehsan.amiri

  • Playmaker Newbie
  • *
  • Posts: 4
need help getting material name
« on: February 20, 2016, 10:22:37 AM »
Hello
I Have question and i hope you help me with this one

So i have a Gameobject
and i want to get it's Material name
for example if it's red then i want to add "Red" Tag to it

Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: need help getting material name
« Reply #1 on: February 20, 2016, 12:32:42 PM »
On the Ecosystem, there's an action called "Material Compare" which should do what you need.

Get the material on the object and store the variable. Use the Material Compare action to compare it against the red material.

Alternatively, use the "Get Property" action on the material component of the object, and store it's name as a string.
« Last Edit: February 20, 2016, 12:36:49 PM by Chizzler »