C++ Reference
Module dependency
Section titled “Module dependency”Add OperatingSystemQRCode to your .Build.cs:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OperatingSystemQRCode"});Header
Section titled “Header”#include "OperatingSystemQrCodeGenerator.h"Static API
Section titled “Static API”// Simple black-on-white QRUTexture2D* QR = UOperatingSystemQrCodeGenerator::GenerateQrCodeTextureSimple(TEXT("Hello world"));
// Custom error correction and colorsUTexture2D* Branded = UOperatingSystemQrCodeGenerator::GenerateQrCodeTexture( TEXT("https://yetitechstudios.com"), EQrCodeErrorCorrectionLevel::High, false, FLinearColor::White, FLinearColor(0.02f, 0.05f, 0.2f, 1.f), true);enum class EQrCodeErrorCorrectionLevel : uint8{ Low, // ~7% Medium, // ~15% High, // ~25% VeryHigh // ~30%};- Guaranteed for strings with ≤ 2953 UTF-8 code units on the simple path.
- Returns a new UTexture2D — store on your UObject or assign to UI brush.
- Blueprint category name: Qr Code Generator.