Shader wants texture coordinates, but the mesh doesn't have them?

I’ve been working on this game i created, and usually everytime i test it, i come up with a warning: Shader wants texture coordinates, but the mesh doesn’t have them
UnityEditor.DockArea:OnGUI()

Now, i have narrowed the problem down to 9 meshes that all have blank names, so i am not sure which of them it is, so i try renaming the meshes, but i cant.

This problem is really annoying especially when debuging, because it creates 119 of these repeated warnings. They dont seem to effect the game very much.

Does anyone know the exact cause of this problem, and any idea how i would solve it?

the shader wants texture coordinates but the mesh doesn’t have them.

switch the shader to one which does not require texture coordinates or give texture coordinates to the meshes which use this shader.

seriously. the warning tells you what you need to know. but you don’t tell us what we need to know to help you any further. we have no information about your meshes and no information about your shader so how do you expect someone beeing able to help you beyond to repeat what the warning tells already? the more important information you give the more likely someone will identify the problem.

have you tried double clicking the warning?

are you actually assigning these textures to a mesh or a GUIObject which isn’t literally a mesh but a dynamically generated mesh, which is a whole difference (and also the reason why you cant rename etc. for it’s dynamically generated, it does not really excist).

understanding the magnitude of a problem helps. I think by not looking closely enough what’s happening we’re getting steered in the wrong direction :wink:

Can you post parts of the involved parts of code/shader/etc?

Your mesh needs UVs.

–Eric

how would i go about changing the shader?

select another one in the material used by the mesh.

yes, i know that, but which shader would be the best? Like, which one should i choose that wont require Texture Coordinates

let me quote myself:

so i have absolutely no clue what your requirements are (as you repeatedly refuse to tell us) so i cannot know which is “the best” (if there would be any best at all). look in the shaders documentation and decide which ones meet your requirements. if you refuse to tell us anything important to enable people to help you i refuse trying to help further you so i’m out.

You see, thats the problem. This Happened almost spontaniously, and i barly know much about it. I tried to fix it myself, like search the internet and what-not. The actual object it is, is a hand model i acquired from the Internet, since i cannot for the life of me make a model for a hand, let alone texture it properly. The model was all good and everything was fine. It worked flawlessly. Then problems started erupting awhile ago, and i have given up. This problem does not affect my game what-so-ever, so all i ask is how i can make these warnigns go away, or, find a shader that doesnt require texture coordinates.

A “Triplanar mapped shader” is a shader which doesn’t require texture coordinates. But i think it’d be easiest to import the model in whichever modeling suite you fancy and let that apply a uv by standard cube-projection, it would give you at least a start and consumes much less resources then a triplanar shader would.

dont worry guys, unity was giving me the WRONG mesh name, it actually wasnt any of the meshes i thought it was, i have fixed the problem and i am now very happy :smile:

thanks for the heads up Eric +1