Skip to content

Latest commit

 

History

History
executable file
·
47 lines (30 loc) · 1.51 KB

README.md

File metadata and controls

executable file
·
47 lines (30 loc) · 1.51 KB

QR code generator - Godot Engine 4.1+

Issues Pull requests

Version for Godot Engine 3.4+

QR code generator written in GDScript.

A QR code is a type of two-dimensional barcode made up of black square modules arranged in a square with a white background. These dots define the information contained in the code.

This generator creates textures of a QR code from a string.

How to use

Create a new QR code instance and pass it your text. The class returns an ImageTexture that you can add in an Image

var qr_code: QrCode = QrCode.new()

# choose the level of error correction (LOW, MEDIUM, QUARTILE, HIGH)
qr_code.error_correct_level = QrCode.ErrorCorrectionLevel.LOW

var texture: ImageTexture = qr_code.get_texture("Godot") # Add your text here

var qr_code_image := $Path/To/QrCodeImage
qr_code_image.texture = texture

qr_code.queue_free() # clean up to avoid leaks

Godot QR code

Dependencies

This project require Godot Engine 4.1+

Licenses

  • The source code is available under the MIT license.