Answer by ravin5432
I get this error every time any scene loads that has sprites used in the UI. I will attach an image to show the setup. As you can see, it shows the image as just red lines, and its just the default...
View ArticleAnswer by JAAMY
if you are using a SRP ( unity shader graph ) , open your graph in its graph window, then add a property with type of **Texture2D** then name it : **"_MainTex"** and also name it's **reference** to...
View ArticleAnswer by MaxxRafen
In my case, I didn't have a source image set, only the material. Every change to the material would throw this error. I set the source to a dummy image and the error went away.
View ArticleAnswer by hutchison-kim
See this post: https://forum.unity.com/threads/material-doesnt-have-a-texture-property-_maintex.100652/#post-3352921
View ArticleAnswer by DuckOfDoom
I know this question is really old but I found a way to diagnose this error. You have to find your shader in project tab, select it and in inspector you will see an error. Then you can click "Open...
View ArticleAnswer by kurifu
Rebooting my computer usually fixes this error, not sure what causes it but this looks to be a Unity bug (of course this is assuming that you do infact have the _MainTex property defined in your shader...
View ArticleAnswer by TopTor
check the appropriate include in shader file for example #include "UnityCG.cginc" #include "AngryInclude.cginc" etc
View ArticleAnswer by messyfresh
Its all dependent on the shader you are using. I started with OpenGL ES1.1, then changed to OpenGL2.0. After i switched i noticed i was still getting the error. I had to change the graphics emulation...
View ArticleAnswer by pepefirst
After a crash in Unity I got exactly the same message. Anyone found a fix for this?
View ArticleAnswer by Andy Korth
It's probably named something else in your shader.. or your shader doesn't have a _MainTexCheck your shader for a line like this:Properties { _MainTex ("Base (RGB)", 2D) = "white" {} }
View ArticleAnswer by hutchison-kim
See this post: https://forum.unity.com/threads/material-doesnt-have-a-texture-property-_maintex.100652/#post-3352921
View ArticleAnswer by DuckOfDoom
I know this question is really old but I found a way to diagnose this error. You have to find your shader in project tab, select it and in inspector you will see an error. Then you can click "Open...
View ArticleAnswer by kurifu
Rebooting my computer usually fixes this error, not sure what causes it but this looks to be a Unity bug (of course this is assuming that you do infact have the _MainTex property defined in your shader...
View ArticleAnswer by TopTor
check the appropriate include in shader file for example #include "UnityCG.cginc" #include "AngryInclude.cginc" etc
View ArticleAnswer by messyfresh
Its all dependent on the shader you are using. I started with OpenGL ES1.1, then changed to OpenGL2.0. After i switched i noticed i was still getting the error. I had to change the graphics emulation...
View ArticleAnswer by pepefirst
After a crash in Unity I got exactly the same message. Anyone found a fix for this?
View ArticleAnswer by Andy Korth
It's probably named something else in your shader.. or your shader doesn't have a _MainTexCheck your shader for a line like this:Properties { _MainTex ("Base (RGB)", 2D) = "white" {} }
View ArticleAnswer by DuckOfDoom
I know this question is really old but I found a way to diagnose this error. You have to find your shader in project tab, select it and in inspector you will see an error. Then you can click "Open...
View ArticleAnswer by kurifu
Rebooting my computer usually fixes this error, not sure what causes it but this looks to be a Unity bug (of course this is assuming that you do infact have the _MainTex property defined in your shader...
View ArticleAnswer by TopTor
check the appropriate include in shader file for example #include "UnityCG.cginc" #include "AngryInclude.cginc" etc
View Article