Home

Published

- 1 min read

unity main texture not working

img of unity main texture not working

The solution for this is noted below

unity main texture not working

Solution

   //Get object renderer
rend = GetComponent<MeshRenderer>();

//deprecated do not use
rend.material.maintexture = newTexture;

//proper method
rend.material.SetTexture("_BaseMap",newTexture);

Try other methods by searching on the site. That is if this doesn’t work