Tag Archives: UE4 Error

[Solved] UE4 Error: Couldnā€˜t find file for package *** requested by async loading code. NameToLoad: ***

The dynamic loading of some resources fails when a map is packaged separately. The error log is as follows:

[2022.06.16-09.06.47:875][  0]LogStreaming: Error: Couldn't find file for package /SarajePlayerUI/UI/WBP_SarajePlayerRecommendBar requested by async loading code. NameToLoad: /SarajePlayerUI/UI/WBP_SarajePlayerRecommendBar
[2022.06.16-09.06.47:875][  0]LogStreaming: Error: Found 0 dependent packages...
[2022.06.16-09.06.47:875][  0]PIE: Error: CreateWidget called with a null class.

This problem is very strange. In the self-developed plug-in directory, other resources can be loaded with c++ code, but only the following materials cannot be loaded successfully:

UClass* WidgetClass = LoadClass<UUserWidget>(nullptr, TEXT("WidgetBlueprint'/SarajePlayerUI/UI/WBP_SarajePlayerPreview.WBP_SarajePlayerPreview_C'"));

Solution:

Add the directory where the resource is located in Additional Asset Directories to Cook of packaging settings (screenshot as below):

[Solved] UE4 Error: Serial loading Unknown structure

Background: when compiling UE4 C + + project, there are unknown structure and other errors;

After the query, it is found that after the structure defined in C + + is exposed to the blueprint, a new container is re created, including many structures. The data type of this container is defined as: allzmqdatapool

Define a new variable in gameinstance. The variable type is allzmqdatapool; Create a method to quickly get variables in common func.

The above problem occurs when packaging after compilation.

Less nonsense, the solution is as follows:

1. Directly modify the name of the structure container; After modifying the name, recompile from the C + + project, then reopen the project, package and solve it;

2. If there are only a few sporadic errors and you don’t want to change your name, you can select refresh all nodes in the blueprint of the error report through the “file” option, and then compile again, repackage and solve it;

Basically, the above two methods are easy to use.