当前位置:网站首页>Use of ue5 QRcode plug-in
Use of ue5 QRcode plug-in
2022-07-03 08:15:00 【The east wind blows the Willows】
This plug-in is repackaged with the source code , Do not rely on static libraries , Pure source code , Apply to more than one UE edition , There is no problem with the editor and packaging release . I am UE5EA Upper test passed .
1. Source access address
2. Plug-in address
UE4UE5QRCode Source version - Internet document resources -CSDN download
3. Major changes
For use after packaging , Revised UQRCodeComponent Class GenerateQrCode Method :
UTexture2D* UQRCodeComponent::GenerateQrCode(UObject* parent, FString string)
{
qrcodegen::QrCode qr = qrcodegen::QrCode::encodeText(TCHAR_TO_UTF8(*string), qrcodegen::QrCode::Ecc::LOW);
uint8 size = qr.getSize();
TArray<FColor> pixels;
pixels.SetNumZeroed(size * size);
FColor black = FColor::Black;
FColor white = FColor::White;
for (uint8 x = 0; x < size; x++)
{
for (uint8 y = 0; y < size; y++)
{
FColor color = qr.getModule(x, y) ? white : black;
pixels[x + y * size] = color;
}
}
UTexture2D* texture = UTexture2D::CreateTransient(size, size, EPixelFormat::PF_B8G8R8A8, "QRCode");
void* data = texture->PlatformData->Mips[0].BulkData.Lock(1);
FMemory::Memcpy(data, pixels.GetData(), size * size * 4);
texture->PlatformData->Mips[0].BulkData.Unlock();
texture->UpdateResource();
texture->Filter = TextureFilter::TF_Nearest;
return texture;
}4. Usage method
1) Create a actor Blueprint class , To add QRCode Components

2) Create a for displaying QR code UI

3) Write blueprint code in the level blueprint

4) Running effect

边栏推荐
猜你喜欢

方正锐利重磅升级到12.0版本,包装印前处理更加便捷、高效!

Unity2019_ Natural ambient light_ Sky box

IP production stream is so close to me

Zohocrm deluge function application time verification

Install cross compiler arm none liunx gnueabihf

Transplantation of freetype Library

L'installateur a été installé avec une erreur inattendue

How to configure GDAL under idea

多旅行商问题——公式和求解过程概述

Easy touch plug-in
随机推荐
Base64和Base64URL
Initial unity
C language - Introduction - essence Edition - take you into programming (I)
idea取消引用顯示效果
Delete the last character of the string in golang
[global product discovery 2] the first pure cloud augmented reality (AR) platform - Israel
Install cross compiler arm none liunx gnueabihf
Oracle queries grouped by time
A tunnel to all ports of the server
haproxy+keepalived搭建01
P2704 [NOI2001] 炮兵阵地(状压dp)
Golang中删除字符串的最后一个字符
One dimensional array two dimensional array (sort Max insert sort)
[cocos creator] Click the button to switch the interface
Get to know unity2 for the first time
数据库应用技术课程设计之商城管理系统
Conversion between golang JSON format and structure
Unity2019_ Lighting system
Retail philosophy retail psychological warfare after reading -- 7-11 is a good product!
animation