// Update is called once per frame void Update() { GameObject test = _enemyFinder.GetNearestTarget(); if (test != null) { Debug.Log(test.gameObject.name); } setLightValue1(); setLightValue2(); }