I’m working on a simple game for a project. I need to have a GUI.Window representing the Inventory, and populate the window with text as items are collected.
void InvBox(int windowID)
{
//Only display the label if the player has collected the cloth
if (itemA == "Cloth")
{
//When taken out of the if statment, this bit writes the text just fine.
GUI.Label (new Rect (10, 10, invBoxW, 100), "Cloth", "InvTxt");
//I know the if statement runs, because after I pick up the cloth, this bit prints out.
print("It runs...");
}
//This is just the other item
//GUI.Label (new Rect (0, 0, invBoxW, 100), itemB, "InvTxt");
}
I just know there’s some simple condition I’m missing here. I’m still a beginner at this stuff, so I’m hoping someone with some experience can shed some light on why this isn’t working.
Any help is much appreciated.