for (int i = 0; i < Objects.Length; i++) { if (Objects[i] == ItemLookingAt) { dot.SetActive(true); } else { dot.SetActive(false); } }