private void Update() { if (flaggedForDoT) { DoTBehavior(); } if (GetComponent <Renderer>().IsVisibleFrom(Camera.main)) { healthBarControls.Show(); } else { healthBarControls.Hide(); } }