Material texture changed via script, but doesn't update until I stop playback

This is odd, and it seems to have started out of nowhere. It was working fine, then I made a few tweaks to my script, and now, for some reason, when I change the material’s texture - it won’t show the updated texture until I hit STOP in the Unity editor. It does the same thing if I create an exe.

Texture2D texture = (Texture2D)TextureList[TextureToDraw];
MyMat.mainTexture = texture;

A Renderer has various ways to access the material, for example via Renderer.material and Renderer.sharedMaterial.

If some code in your game is accessing the Renderer.material property, Unity creates a copy of the material for that renderer, thus changes to the original material do not affect the renderered object anymore. If you leave play mode, Unity stops using the copied material and uses the material in the project again.

This seems to be pretty much what you see in your project. I recommend to check if your code is accessing the .material property.