- Home /
 
How do I display the contents of a class in a Label
I'm trying to display the following information in a label from a class, but I don't get the expected results, only the name. I tried the same replacing ItemInfo but no success either.
 function Start(){
 
 //Borrows from Item Class in separate script (name : String, itemID : int, description : String, baseCost : int, baseSell : int)
 
 if(itemNumber == 1) info = new ItemInfo("Steel", 1, "A standard building material", 100, 50);
 }
 
 function OnGUI(){
 
     GUI.Label (Rect (0,Screen.height - 100,150,150),"" + info);
 
     }
 
              
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
How to make GUI Text appear after a certain amount of time 2 Answers
2D talking to npc JavaScript 1 Answer
How to display text using javascript ? 1 Answer
How to display EULA from Doc in Unity? 0 Answers