SOLVED Find BaseMaterial that owns a BaseShader?

Hi,

I have the pointer to a BaseShader in my scene. Now I'd like to get the pointer to the BaseMaterial that holds the shader. How can I do that?

Cheers,
Frank

GetMain() should do the trick

Oh, never noticed that. Thanks, I'll try that! 🙂

hi,

Confirmed, thanks @mp5gosu.

That also work if the shader is inside another shader.

Cheers,
Manuel