Skip to main content

QR Code

QR Code Generator

The QR Code Generator is a behavior that generates a QR code from a specified text and displays it as an image. It can be used in both 2D and 3D scenes. The generated QR code is primarily displayed as a bitmap and can be used within the scene. The text can be dynamically updated via properties or data binding.

Property Name Type Description
PropertyReference
Enum
Specifies how the text value is obtained. 
Self Retrieve from this object's property 
Other Retrieve from another behavior or node
PropertyProvider
Candera::AbstractNodePointer
Specifies the behavior or node that provides the text value when PropertyReference is set to "Other".
Size
Integer
Specifies the size of the bitmap containing the QR code (in pixels). Primarily used when displaying as a bitmap in 2D scenes.
Text
String
Specifies the text to encode into the QR code. This value can be dynamically updated via data binding.
ErrorCorrection Enum

Specifies the error correction level. Determines how much of the QR code can be damaged while still remaining readable. 

Low
Up to approximately 7% of the QR code can be damaged and still be readable. 
Medium
Up to approximately 15% of the QR code can be damaged and still be readable.
Quartile
Up to approximately 25% of the QR code can be damaged and still be readable.
High
Up to approximately 30% of the QR code can be damaged and still be readable.
MaxVersion
Integer
Specifies the maximum QR code version (size limit). Increasing this value allows more data to be stored.

Supported data capacity depends on the selected error correction level and version.
Up to 4296 alphanumeric characters can be stored. For details, see:
https://en.wikipedia.org/wiki/QR_code#Information_capacity

A higher error correction level improves readability in cases where the QR code is partially obscured or hard to scan, for example due to glare on the screen.

Kanji mode is not supported.
Characters other than numeric and alphanumeric (such as Japanese text) are encoded in byte mode, which increases data size and may reduce the maximum number of characters that can be stored.

Usage in 2D and 3D Scenes

The QR Code Generator can be used in both 2D and 3D scenes to generate QR codes from a specified text. While the behavior itself is identical in both cases, the display method differs depending on the scene type.

  1. Add the QR Code Generator behavior to a node used for display (e.g., a bitmap node in 2D scenes or a Billboard node in 3D scenes).
  2. Set the text to be encoded in the QR code using the Text property of the QR Code Generator behavior.
  3. The QR code is generated as a texture and applied to the target node.

In 2D scenes, the generated QR code can be displayed directly as a bitmap.
In 3D scenes, shader processing is required in order to visualize the information stored in the alpha channel.