Texture2D not showing in build, but shows up in editor

I have a Texture2D that I pass to a GUI.Box that shows up in the editor but not when I run the build standalone version.


			style.normal.background = m_LeftFootBoxTexture;
			GUI.Box(new Rect(Screen.width - 375, leftFootBoxHeight, 50, 25 ), "L", style);
			style.normal.background = m_RightFootBoxTexture;
			GUI.Box(new Rect(Screen.width - 325, rightFootBoxHeight, 50, 25 ), "R", style);

I have tried to pass the textures directly, like so:

		GUI.Box(new Rect(Screen.width - 475, leftFootBoxHeight, 50, 25), m_LeftFootBoxTexture);
		GUI.Box(new Rect(Screen.width - 425, rightFootBoxHeight, 50, 25), m_RightFootBoxTexture);

This made no difference.

The textures and style are created in the Start() method.

	m_LeftFootBoxTexture = new Texture2D(1, 1);
	m_RightFootBoxTexture = new Texture2D(1, 1);
	style = new GUIStyle();

I change the color for each pass. Like so:

		m_LeftFootBoxTexture.SetPixel(0, 0, m_LeftBoxColor);
		m_RightFootBoxTexture.SetPixel(0, 0, m_RightBoxColor);

Does anyone have any clue as to what could cause this?

Try m_LeftFootBoxTexture.Apply() and m_RightFootBoxTexture.Apply() after you initialize the textures. You might want to also add those right below you finish modifying them with SetPixel.