void Start() { Texture2D img = QR.GenerateBarcode("hello world!", (int)cRawImage.rectTransform.rect.width, (int)cRawImage.rectTransform.rect.width); cRawImage.texture = img; cRawImage.rectTransform.sizeDelta = new Vector2(img.width, img.height); }