- Home /
Some questions about Gui.Window
Hello,
I'm trying to make a window, for an RPG game, which holds all the information about the character. But I'm having a few problems:
- How do I enter the character's stats in here? They are declared and updated in another script. They are all public, but I can't access them. If I do declare a new instance of that script to access these stats, they will not be updated together with the original one, right? 
- In the function that GUI.Window requires, I have to return something, but I don't understand what. 
Thanks in advance!
Simon.
Answer by Dreamer · May 24, 2011 at 04:02 AM
[1] How do I enter the character's stats in here?
Two ways:
- You can make the variables static, and access them through StatusScript.Var1 
- You can attach it to an object, and access them through GameObject.Find("Character").GetComponent(StatusScript).Var1 
[2] In the function that GUI.Window requires, I have to return something, but I don't understand what.
You do not need to return anything in that function. Refer to :http://unity3d.com/support/documentation/ScriptReference/GUI.Window.html
Your answer
 
 
             Follow this Question
Related Questions
picture in picture 3d. 0 Answers
Dragging and Locking Buttons. 1 Answer
Window Background Image not showing 1 Answer
GUI Focusing multiple windows 1 Answer
GUI.Window function with variables? 3 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                