void FixedUpdate() { UpdateKnockback(); UpdateAcceleration(); UpdatePosition(); if (ui == null) { if (player1) { ui = GameObject.FindGameObjectWithTag("Player1UI").transform.GetChild(0).GetComponent <UI_Player_Manager>(); } else { ui = GameObject.FindGameObjectWithTag("Player2UI").transform.GetChild(0).GetComponent <UI_Player_Manager>(); } } }