当前位置:网站首页>When opening the system window under UE4 shipping, the problem of crash is attached with the plug-in download address
When opening the system window under UE4 shipping, the problem of crash is attached with the plug-in download address
2022-07-07 15:42:00 【WhiteTian】
Original article , Reprint please indicate the source .
Shipping Next, open the system window and crash
Plug in download link
SelectDialog Plug in download link
Preface
If you encounter normal development (Debug/Develope) It's no problem to call the interface to open the system window , and Shipping If you break down directly , Let's see if it's the same problem .
Description of collapse phenomenon : call FDesktopPlatformModule::Get()->OpenFileDialog To open the interface under different systems , For example, you need to import the model at run time , Import pictures, videos, audio and other functions , You will use this function .
Here's the picture , I want to choose a computer in the program fbx Import the format model . stay dubug Under the normal , The bag that came out collapsed .
How to solve ? What's the reason ?
The code you call should be similar to the following (FDesktopPlatformModuleEx It's one of my packages shipping Plug in for next use .FDesktopPlatformModuleEx::Get())
/* Open the system folder path Parameters 1: File absolute path Parameters 2: file type TEXT("*.*")= All Record : TEXT("FBX,JPG,BMP,PNG files|*.fbx;*.jpg;*.png;*.bmp"); TEXT("FBX Files|*.fbx"); TEXT("JPG,BMP,PNG files|*.jpg;*.png;*.bmp"); TEXT("(Image Files)|*.BMP;*.JPG;*.PNG;*.JPEG;)") */
UFUNCTION(BlueprintCallable, Category = "OpenWindowsFile")
static TArray<FString> OpenWindowsFiles(const FString& sTitle, const FString& sYourFullPath, const FString& sExtensionStr = TEXT("*.*"));
TArray<FString> URegionRiskReadLibrary::OpenWindowsFiles(const FString& sTitle, const FString& sYourFullPath, const FString& sExtensionStr)
{
// List of files selected by the user
TArray<FString> OpenFileNames;
IDesktopPlatform* DesktopPlatform = FDesktopPlatformModuleEx::Get();
if (DesktopPlatform)
{
void* ParentWindowHandle = GEngine->GameViewport->GetWindow()->GetNativeWindow()->GetOSWindowHandle();
DesktopPlatform->OpenFileDialog(ParentWindowHandle, sTitle, sYourFullPath, TEXT(""), *sExtensionStr, EFileDialogFlags::Multiple, OpenFileNames);
}
return OpenFileNames;
}
The reason for the breakdown
Actually, we are shipping The following cannot be quoted Engine in Developer Contents of any module in the folder , This can only be Debug and Develope Next use .
PS:Engine in Developer It refers to the following figure Developer All modules in the folder .
All modules in this folder cannot be in shipping Under the use of , If used , Phenomenon is shipping Downfall , The corresponding supporting documents are not in the bag at all .
You should know what happened here , In fact, it is because you call to open the system window API It belongs to DesktopPlatform modular , Happen to happen DesktopPlatform This module is again Developer Within the scope of .
Solution
Actually, it's simple , That's the top Developer In the folder DesktopPlatform Module and what it uses Related modules ( stay Developer Range ) Copy out , Modify the class name and module name .
See here , I believe you will know how to solve similar problems if you encounter them again .
So I made a plug-in , Tested for 4.25 Each version and 4.26 Each version . Other versions have not been tested .
How does the plug-in work
1> Unzip it and put it into your project Plugins In the folder ;
2> In your build.cs There will be DesktopPlatform Module reference , Replace with DesktopPlatformEx Just name the module ;
3> Get rid of DesktopPlatform The header file contains ;
4> Remember when calling FDesktopPlatformModuleEx::Get(); Put... In your code FDesktopPlatformModule Replace with FDesktopPlatformModuleEx;
/* Open the system folder path Parameters 1: File absolute path Parameters 2: file type TEXT("*.*")= All Record : TEXT("FBX,JPG,BMP,PNG files|*.fbx;*.jpg;*.png;*.bmp"); TEXT("FBX Files|*.fbx"); TEXT("JPG,BMP,PNG files|*.jpg;*.png;*.bmp"); TEXT("(Image Files)|*.BMP;*.JPG;*.PNG;*.JPEG;)") */
UFUNCTION(BlueprintCallable, Category = "OpenWindowsFile")
static TArray<FString> OpenWindowsFiles(const FString& sTitle, const FString& sYourFullPath, const FString& sExtensionStr = TEXT("*.*"));
TArray<FString> URegionRiskReadLibrary::OpenWindowsFiles(const FString& sTitle, const FString& sYourFullPath, const FString& sExtensionStr)
{
// List of files selected by the user
TArray<FString> OpenFileNames;
IDesktopPlatform* DesktopPlatform = FDesktopPlatformModuleEx::Get();
if (DesktopPlatform)
{
void* ParentWindowHandle = GEngine->GameViewport->GetWindow()->GetNativeWindow()->GetOSWindowHandle();
DesktopPlatform->OpenFileDialog(ParentWindowHandle, sTitle, sYourFullPath, TEXT(""), *sExtensionStr, EFileDialogFlags::Multiple, OpenFileNames);
}
return OpenFileNames;
}
thank you , It's not easy to create , Great Xia, please stay … Move your lovely hands , To a Focus on Go bai
ღ( ´・ᴗ・` ) finger heart <( ̄︶ ̄)>
边栏推荐
- Connecting FTP server tutorial
- [target detection] yolov5 Runtong voc2007 data set
- [Data Mining] Visual Pattern Mining: Hog Feature + cosinus Similarity / K - means Clustering
- [understanding of opportunity -40]: direction, rules, choice, effort, fairness, cognition, ability, action, read the five layers of perception of 3GPP 6G white paper
- Oracle控制文件丢失恢复归档模式方法
- 有钱人买房就是不一样
- 【数字IC验证快速入门】23、SystemVerilog项目实践之AHB-SRAMC(3)(AHB协议基本要点)
- There is a cow, which gives birth to a heifer at the beginning of each year. Each heifer has a heifer at the beginning of each year since the fourth year. Please program how many cows are there in the
- 【数字IC验证快速入门】18、SystemVerilog学习之基本语法5(并发线程...内含实践练习)
- [quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)
猜你喜欢

Spin animation of Cocos performance optimization

全日制研究生和非全日制研究生的区别!

【數字IC驗證快速入門】26、SystemVerilog項目實踐之AHB-SRAMC(6)(APB協議基本要點)
![[deep learning] image hyperspectral experiment: srcnn/fsrcnn](/img/84/114fc8f0875b82cc824e6400bcb06f.png)
[deep learning] image hyperspectral experiment: srcnn/fsrcnn

【目标检测】YOLOv5跑通VOC2007数据集
![[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)](/img/78/29eb8581e9a8fb4c6c7e1e35ad7adc.png)
[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)
MongoD管理数据库的方法介绍

Getting started with webgl (4)

一大波开源小抄来袭

【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類
随机推荐
Jacobo code coverage
【OBS】RTMPSockBuf_ Fill, remote host closed connection.
Implementation of crawling web pages and saving them to MySQL using the scrapy framework
[make a boat diary] [shapr3d STL format to gcode]
Typescript release 4.8 beta
jacoco代码覆盖率
Configure mongodb database in window environment
How to release NFT in batches in opensea (rinkeby test network)
简述keepalived工作原理
Share the technical details of super signature system construction
[quick start of Digital IC Verification] 19. Basic grammar of SystemVerilog learning 6 (thread internal communication... Including practical exercises)
Unity's ASE realizes cartoon flame
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
【数字IC验证快速入门】20、SystemVerilog学习之基本语法7(覆盖率驱动...内含实践练习)
【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類
[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)
最安全的证券交易app都有哪些
There is a cow, which gives birth to a heifer at the beginning of each year. Each heifer has a heifer at the beginning of each year since the fourth year. Please program how many cows are there in the
OpenGL's distinction and understanding of VAO, VBO and EBO
【数字IC验证快速入门】24、SystemVerilog项目实践之AHB-SRAMC(4)(AHB继续深入)