how to make something not be equal to a value

hi, so i have a script to check if there is a texture in a gui box, and if there isn’t another box won’t be equal to that texture. I.E.

if(BoxTexture != Blank)

{

if(BoxTexture == CopperTexture)

{

OtherBox == CopperTexture;

}

}

i would like to then make OtherBox not equal to the Copper Texture if the texture has been removed? is there a way to do this like :

OtherBox != CopperTexture?

I tested with Destroy(ThatBox); rather than setting up a texture comparison, so you’ll have to change it, but it functions.

#pragma strict

var ThisBox : GameObject;
var ThatBox : GameObject;

function Start()
{
ThisBox = GameObject.Find("BoxTexture"); 
ThatBox = GameObject.Find("OtherBox"); 
}

function Update()
{
	if(ThisBox.renderer.material.mainTexture != null) 
		{
		
 		if(OtherBox.renderer.material.mainTexture == "CopperTexture");
	//if(renderer.material.mainTexture == ("CopperTexture"))
			{
  		ThatBox.renderer.material.mainTexture = "SomeDefaultTexture";
  		//or remove the texture.
			}
		}

}

You’ll have to find your correct textures obviously and set them up.
If you want to not use CopperTexture you could build an array to assign a different texture to the object and exclude CopperTexture from the list. Although… depending on how many resources you have that could slow things down (target platform?).