Image parameter in editor disappears when selecting custom material for sprite [SOLVED]

As above: when creating a new sprite in a game object and selecting a custom material first, the image parameter disappears. Is this an intended behaviour or a bug?

1 Like

It seems to happen for materials that don’t have any samplers.

1 Like

Yes I think that for sprite component, it use the first sampler2D used in the material as the “image” texture.
So you must have a
Uniform sampler2D mytexture
in the shader.

Or you add explicitly the sampler in the material attribute, then it will use that and it should show up I guess.

1 Like