using System.Collections; using System.Collections.Generic; using UnityEngine; public class LivesVisualizer : MonoBehaviour { public Transform livesParent; public void SetLives(int lives){ for(int i = 0; i < livesParent.childCount; i++){ livesParent.GetChild(i).gameObject.SetActive(i < lives); } } }