Jump to content

[SOLVED] missing setMaterial with Material parameter


photo

Recommended Posts

hi:

   Currently i need create a temporary material  and assign to a object. But the setMaterial method only allow use string as material name in the library

is there anyway to use material directly?

 

thanks

 

Link to comment

Hi Cinetec!

 

Unfortunately, there's no way you can assign Material instance directly, so if you want to create temp material them you'll have to assign it by its name. Another way of solving your task could be getMaterialInherit function which will create a new material instance inside which will be inherited from currently assigned material. Then you can do everything you want with that material.

Link to comment
×
×
  • Create New...