public void SetData(BallData data) { this.data = data; if (spriteRenderer == null) { InitializeSprite(color); } var radius = data.GetRadius(); transform.localScale = new Vector3(radius, radius, 1); UpdatePosition(); }