void FixedUpdate() { if (fogOfWar != null) { if (fogOfWar != null && fogOfWar.enabled && fogOfWar.gameObject.active) { for (int i = 0; i < thisRenderer.Length; i++) { thisRenderer[i].enabled = fogOfWar.IsRevealed(transform.position); isVisible = fogOfWar.IsRevealed(transform.position); } } } }
void Update() { if (fogOfWar != null && fogOfWar.enabled && fogOfWar.gameObject.active) { renderer.enabled = fogOfWar.IsRevealed(transform.position); } }