-1

I have a material whose shader has a opacity property which I want to change at runtime. How do I get the reference to that property.

enter image description here

Sameer Hussain
  • 2,421
  • 8
  • 23
  • 41

1 Answers1

3

This is done via Material.SetFloat.

You'll need to use the actual property reference name as key, not the Inspector display name, e.g.

enter image description here

derHugo
  • 83,094
  • 9
  • 75
  • 115