当前位置:网站首页>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
边栏推荐
- jupyter远程服务器配置以及服务器开机自启
- Yolo series --- xml2txt script
- RM delete file
- 【cocos creator】点击按钮切换界面
- Wechat applet taro learning record
- Storage of data
- idea取消引用显示效果
- IP production stream is so close to me
- [set theory] order relation (hastu example | divisive relation hastu | inclusive relation hastu | refinement relation hastu)
- animation
猜你喜欢
Pycharm remote ssh pyenv error: pydev debugger: warning: trying to add breakpoint to file that does
[set theory] order relation (the relation between elements of partial order set | comparable | strictly less than | covering | Haas diagram)
ArrayList
Docker installs MySQL and successfully uses Navicat connection
*p++、*++p、++*p、(*p)++
Editor Extensions
Basic operation and process control 2
Multi traveling salesman problem -- overview of formula and solution process
Zohocrm deluge function application time verification
Oracle queries grouped by time
随机推荐
使用 FileChannel 进行文件的复制拷贝
An intern's journey to cnosdb
一条通往服务器所有端口的隧道
Get to know unity2 for the first time
STM32F103 SPI (pit Diary)
Lua framwrok framework starts
Retail philosophy retail psychological warfare after reading -- 7-11 is a good product!
2020-12-12
About Wireshark's unsuccessful installation of npcap
C语言-入门-精华版-带你走进编程(一)
数据分析练习题
Golang json格式和结构体相互转换
C#课程设计之员工信息管理系统
Wpf: solve the problem that materialdesign:dialoghost cannot be closed
Multi traveling salesman problem -- overview of formula and solution process
Register keyword
What is a data type? What is the use of data types?
Golang string segmentation, substitution and interception
Three characteristics
Unity one click AssetBundle