void Start() { GUIHandler = GameObject.FindGameObjectWithTag("GUIHandler").GetComponent <MyGUI>(); _pc = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerNew>(); _characterWindowRect = new Rect(5, 120, 300, 300); _characterPanelNames = new string[] { "Equipment", "Attributes", "Skills" }; inventoryWindowGUI = GameObject.FindGameObjectWithTag("GUIHandler").GetComponent <InventoryWindowGUI>(); }
// Use this for initialization void Start() { if (target == null) { target = GameObject.FindGameObjectWithTag("Player"); } player = target.GetComponent <PlayerNew>(); _pickedUpIconRect = new Rect(0, 0, 40, 40); inventoryWindowGUI = GameObject.FindGameObjectWithTag("GUIHandler").GetComponent <InventoryWindowGUI>(); }