/// <summary> /// Setup UI ranking player info /// </summary> public void SetupUI(int idRef, Sprite icon, string name, Transform car, int totalProgress) { playerID = idRef; playerIcon.sprite = icon == null ? playerIcon.sprite : icon; playerName.text = name; lapProgressBar.value = 0; lapProgressBar.maxValue = totalProgress; //Change Camera event camViewButton.onClick.AddListener(() => { smoothCamera.SetTarget(car); }); }