public void updateCompass() { List <GameObject> l = new List <GameObject>(); foreach (GameObject g in questManager.lootManager.generatedLoot) { if (g.activeSelf) { l.Add(g); } } battleUIScript.updateCompass(currentTurn.transform.position, l); }