playMaker

Author Topic: How to set "Alpha cutoff" material?[SOLVED]  (Read 3933 times)

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
How to set "Alpha cutoff" material?[SOLVED]
« on: October 16, 2013, 03:35:46 AM »
How can I set variable "Alpha cutoff" in material component?

Pls, take a look on the screenshot below.

I tried to drag and drop that into a FSM state but I could't find any relative variable, something like "_Cutoff", "Alpha", "Material Float"

this script seems to work but it doesn't
Code: [Select]
renderer.material.SetFloat("_cutoff", 0.5f);
« Last Edit: October 17, 2013, 05:26:12 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to set "Alpha cutoff" material?
« Reply #1 on: October 17, 2013, 01:44:46 AM »
Hi,

 You must respect capital, it's _Cutoff not _cutoff

 Use "set Materal Float" action to access that and put in the "Named Float" "_Cutoff" to control that.

 to get the proper list of materials properties, select a material and click "edit" in the component inspector, you will get a listing of the shader props including its properties.

Bye,

 Jean

xunxun

  • Junior Playmaker
  • **
  • Posts: 53
Re: How to set "Alpha cutoff" material?
« Reply #2 on: October 17, 2013, 01:52:24 AM »
Thank you much Jean,

How is it simple that much :D

it's solved in seconds ^__^