Skip to main content

QR code display

This plugin also includes the necessary functions to generate a QR code from a string. It could be separated in its own plugin.

Getting the image

Two blueprint nodes are provided to generate QR codes from URIs : GenerateQrCode and GenerateScaledQrCode. Both return a UTexture2D, but GenerateQrCode provides the minimal size texture (one pixel per bit) whereas GenerateScaledQrCode multiplies dimensions by a given factor.

Displaying the texture

The UTexture2D can be displayed in various ways in the virtual environment.

It can be used as an image in a widget, either in HUD or localized in space. For this purpose, it is unnecessary to preemptively scale the QR code, it will not lose its sharpness when resizing.

BlueprintDisplay
QR widget bpQR widget display

It can also be used as a material variable. This means that we can directly print the QR code on meshes. Rather than modifying the underlying material of a mesh, we suggest using a decal to print the QR code on any mesh. If the texture is too blurry due to scaling, use GenerateScaledQrCode and increase the scale parameter.

BlueprintDisplay
QR decal bpQR decal display