sr4dev / Unity-SpriteAssist

Unity Sprite mesh extension
https://github.com/sr4dev/Unity-SpriteAssist
227 stars 29 forks source link

Issues when shaders don't use _MainTex #57

Closed sr4dev closed 1 year ago

sr4dev commented 1 year ago

If a shader does not use a MainTexture or uses a property that is not defined with the name _MainTex, any code that tries to access the MainTexture, such as sharedMaterial.mainTexture, will throw an error.

Shader doesn't have a texture property '_MainTex'