GUI Textures disappearing (on buttons)

I am currently developing an app for Android, and some buttons are losing their textures. The function of the button still works despite the fact that the textures don’t exist (the size of the button is the same, but is invisible).
I’ve browsed for roughly an hour with no results.

The code is generally copy-paste, and I’m using game objects as a base for my button texture.

On the button that works:

#pragma strict

var createText : Texture2D;
var buty : float;

function OnGUI()
{
	var screenx = Screen.width;
	var screenh = Screen.height;
	var studybutton = GUI.Button(new Rect(screenx/4, screenh*buty, createText.width, createText.height), createText);
	if(studybutton)
	{
		Application.LoadLevel("CN");
	}
}

On the button that’s failing:

#pragma strict

var mainText : Texture;
var buty : float;

function OnGUI()
{
	var screenx = Screen.width;
	var screenh = Screen.height;
	var studybutton = GUI.Button(new Rect(screenx/4, screenh*buty, mainText.width, mainText.height), mainText);
	if(studybutton)
	{
		Application.LoadLevel("MainMenu");
	}
}

I’ve got no clue what exactly is breaking it. On the scene before, this method worked flawlessly, granted it was with one less button (4 total on the scene that breaks, 3 on the one that works fine).

Little more detail:
I’ve noticed that when I first add the objects in, attach the script, then attach the texture, that all the textures work when loading that scene first. If I were to go back to the main menu then navigate back to that scene, the two buttons become (with their functionality and size still working). After maybe starting and stopping the scene 5+ times, the buttons become invisible when starting on that scene, contrary to the prior experience where it exists if that scene is loaded first.
Weird.

This error also exists when testing on an Android phone.

-Edit-

I have just reopened Unity to see if the problem still exists (as if turning something off and on would fix an issue like this) and sure enough.
pic

Don’t mind how the button looks- the resolution is just horribly off for the resolution size available on my screen. It will work fine when tested on the android device (proper set resolution).
Same scripts, 4 separate button scripts, 4 separate button textures. Only two button textures show, but all 4 buttons work (if I click where they should be, they do what they should do).

-edit2-

I suppose I should mention that in the screenshot provided, the two missing buttons are located between the two visible buttons, and then one below the lowest visible button.
They do overlap, so I’ve been thinking it’s a rendering problem and I might have to take an entirely different approach to this button?

-edit3-

I managed to fix it.
The solution:
I three game objects, aside from one of the working game objects, then put all of the stuff in there.
It’s stuff like this that makes me feel stupid. I thought I tried everything but I missed one of the most logical things to attempt.
I suppose this also would have worked if I put everything in the camera as well. But this leaves the question: Why did this all happen in the first place?

Hey thunderseethe!

I might be totally wrong, but I saw that the first script got a Texture2D variable and the other is a Texture var… Wich are not the same. Try changing Texture for Texture2D in the second script.

Math