My Dynamically create Textures are showing up white until i play with the inspector

Hello I have an odd problem,

I am creating players for a soccer game with dynamically created textures for jumpers

When they get created the Texture shows as white, but if i tick and untick the "enable Detail texture" flag it renders fine showing that the texture was created properly, (Pictures below to explain further)

I assume a redraw call gets made when you fiddle with the inspector but i'm unsure how to leverage that.

Thanks for reading, any advice is greatly appreciated :D

![132955-dyn2.png|1500x1024](upload://19V6pcNJIHBPbx8XV1ZhHpg2VDw.png)

I’m not very familiar with the shader you’re using, but an initial look around online suggests that it is multi-compiled to use two variants with the Detail Texture enabled or disabled.

Based on that, because you’re toggling that shader flag back to “on” it updates which variant of the shader it’s using.

With all of this in mind, you should be able to solve your problem at the same time you assign the procedural Texture to the Material by enabling the Keyword in the shader.

// When you assign the Texture to the Material...
// I don't know what yours looks like, so here's an
// approximate guess.
myMaterial.mainTexture = myNewTexture;

// Then, to tell the Material that you want to use it,
// assuming you're using the shader I came across...
myMaterial.EnableKeyword("_TEX_ON");

Hello this is happening when we change the texture of the 2d raw image it is displaying white, if anything changing then it is displaying. what should be going when this happens in 2d Raw image texture change?
Thanks

I was having the exact same issue. I was missing a texture.Apply() call after making changes to the texture.