// Update is called once per frame void Update() { if (DT == null) { DT = GameObject.Find("DataTracker").GetComponent <DataTracker>(); } if (item1focus) { DT.assignItemNum(1, 0); Application.LoadLevel(2); } if (item2focus) { DT.assignItemNum(1, 1); Application.LoadLevel(2); } if (item3focus) { DT.assignItemNum(1, 2); Application.LoadLevel(2); } }