Download

Set media texture in material as parameters

Hi Guys I’m now having trouble using media texture

through tutorial video on Youtube I can easily convert media player > media texture > materials

yet, I want to set the media texture in the materials as a parameters,

so that I can change the media texture dynamically

I right click on the media texture in the material panel

and click switch to “Convert to Parameter”

and it shows error “[SM5](Node TextureSampleParameter2D)Param2D> Requires Texture2D”

does anyone know what this is?

You can’t set it to be the default texture on there.

Just leave something else as default and then when you set it in your instance you can define it.

great! Thank you ZoltanJr!

My first though wast that I might need a different parameters to set if I want a media texture in my material.

That’s why I was insisting on putting media texture as default.

I thought the default parameters might determine whether it can accept media texture or not

no problem. That 1 caught me out for a fair while too. Make sure you trigger your media to play at the same time as well.

Can you please describe you manage to solve this problem? I have the same question but don’t know whats meant with
*
"Just leave something else as default and then when you set it in your instance you can define it. "*

A short explanation would be great.
Thanks!

@jitterhorse Just leave a normal texture as the parameter default. Then, in the material instance you can set it to be a MediaTexture.