private IEnumerator InitRoutine() { LeaderboardRow basisRow = AnyStarLeaderboard.GetComponentInChildren <LeaderboardRow>(); yield return(new WaitForEndOfFrame()); Vector2 leaderboardSize = AnyStarLeaderboard.rect.size; float heightRatio = leaderboardSize.y / baseHeight; float widthRatio = leaderboardSize.x / baseWidth; textRatio = Mathf.Min(heightRatio, widthRatio); rowHeight = baseRowHeight * heightRatio; RectTransform rt = basisRow.GetComponent <RectTransform>(); var rts = rt.sizeDelta; rts.y = rowHeight; rt.sizeDelta = rts; basisRow.SetSize(textRatio); }