Godot plugin that provides a unified GDScript interface for generating and scanning QR codes on Android and iOS using native platform implementations.
The plugin supports:
- Generating QR code images and textures
- Scanning QR codes from images
- Receiving scan results and errors via signals
Key Features:
- Unified GDScript API for Android & iOS
- Generate QR codes as Image or ImageTexture
- Custom foreground and background colors
- Scan QR codes from Image data
- Signal-based scan results and error handling
- Native platform performance
- Demo
- Installation
- Usage
- Signals
- Methods
- Classes
- Platform-Specific Notes
- Links
- All Plugins
- Credits
- Contributing
Try the demo app located in the demo directory.
Before installing this plugin, make sure to uninstall any previous versions of the same plugin.
If installing both Android and iOS versions of the plugin in the same project, then make sure that both versions use the same addon interface version.
There are 2 ways to install the QR plugin into your project:
- Through the Godot Editor's AssetLib
- Manually by downloading archives from Github
Steps:
- search for and select the
QRplugin in Godot Editor - click
Downloadbutton - on the installation dialog...
- keep
Change Install Foldersetting pointing to your project's root directory - keep
Ignore asset rootcheckbox checked - click
Installbutton
- keep
- enable the plugin via the
Pluginstab ofProject->Project Settings...menu, in the Godot Editor
When installing via AssetLib, the installer may display a warning that states "[x number of] files conflict with your project and won't be installed." You can ignore this warning since both versions use the same addon code.
Steps:
- download release archive from Github
- unzip the release archive
- copy to your Godot project's root directory
- enable the plugin via the
Pluginstab ofProject->Project Settings...menu, in the Godot Editor
Add QR node to your main scene or register it as an AutoLoad singleton.
Generating a QR Code:
@onready var qr := $QR
func _ready():
var img := qr.generate_qr_image(
"https://godotengine.org",
512,
Color.BLACK,
Color.WHITE
)
$TextureRect.texture = ImageTexture.create_from_image(img)Generating a Texture directly:
var texture := qr.generate_qr_texture("Hello from Godot!")
$Sprite2D.texture = textureScanning a QR Code from an Image:
@onready var qr := $QR
func _ready():
qr.qr_detected.connect(_on_qr_qr_detected)
qr.qr_scan_failed.connect(_on_qr_qr_scan_failed)
qr.scan_qr_image(my_image)
func _on_qr_qr_detected(data: String) -> void:
print("QR detected: %s" % data)
func _on_qr_qr_scan_failed(error: ScanError) -> void:
print("QR scan failed due to '%s'" % error.get_description())Combine the QR Plugin with the Native Camera Plugin to scan QR codes directly from your device’s live camera feed. See the demo app for a working example.
qr_detected(data: String)- Emitted when a QR code has been successfully scanned along with the scanned dataqr_scan_failed(error: ScanError)- Emitted when scanning a QR code has failed
-
generate_qr_image(uri, size, foreground, background) -> Image- Generates a QR code as a Godot Image.
uri: String– Data to encodesize: int– Output image size in pixels (default: 512)foreground: Color– QR foreground colorbackground: Color– QR background color
-
generate_qr_texture(uri, size, foreground, background) -> ImageTexture- Same as
generate_qr_image(), but returns an ImageTexture.
- Same as
-
scan_qr_image(image: Image) -> void- Scans a QR code from a Godot Image.
- Results are returned asynchronously via signals.
This section documents the GDScript interface classes implemented and exposed by the plugin.
Internal data wrapper used for transferring image data between Godot and native code.
Properties (internal):
buffer: PackedByteArraywidth: intheight: intformat: Image.Formathas_mipmaps: bool
Encapsulates QR scanning errors.
Error Codes:
NONEINVALID_IMAGENO_CODE_DETECTEDSCANNER_FAILUREINTERNAL_ERROR
Methods:
get_code() -> ScanError.Codeget_description() -> String
- Download Android export template and enable gradle build from export settings
- Troubleshooting:
- Logs:
adb logcat | grep 'godot'(Linux),adb.exe logcat | select-string "godot"(Windows) - You may find the following resources helpful:
- Follow instructions on Exporting for iOS
- View XCode logs while running the game for troubleshooting.
- See Godot iOS Export Troubleshooting.
| ✦ | Plugin | Android | iOS | Latest Release | Downloads | Stars |
|---|---|---|---|---|---|---|
| Admob | ✅ | ✅ | ||||
| Connection State | ✅ | ✅ | ||||
| Deeplink | ✅ | ✅ | ||||
| Firebase | ✅ | ✅ | ||||
| In-App Review | ✅ | ✅ | ||||
| Native Camera | ✅ | ✅ | ||||
| Notification Scheduler | ✅ | ✅ | ||||
| OAuth 2.0 | ✅ | ✅ | ||||
| QR | ✅ | ✅ | ||||
| Share | ✅ | ✅ | ||||
| Vision | ✅ | ✅ |
Developed by Cengiz
Based on Godot Mobile Plugin Template v7
Original repository: Godot QR Plugin
Contributions are welcome. Please see the contributing guide in the repository for details.
If this plugin has helped you, consider supporting its development! Every bit of support helps keep the plugin updated and bug-free.
| ✦ | Ways to Help | How to do it |
|---|---|---|
| ✨⭐ | Spread the Word | Star this repo to help others find it. |
| 💡✨ | Give Feedback | Open an issue or suggest a feature. |
| 🧩 | Contribute | Submit a PR to help improve the codebase. |
| ❤️ | Buy a Coffee | Support the maintainers on GitHub Sponsors or other platforms. |


