When I launch my game on Android device I received the following error:
But, the path to my Welcome Screen map is correct!!!
It is OK, when launching on windows.
The game was not started and not installed on device.
What is wrong? What have I missed?
It looks like the map wasn’t cooked and included. Did you add it to the maps to cook in the packaging project settings?
I checked “Cook everything in the project content directory” and seems like helped me, but I received a new trouble:
The code below show, how I am getting the widget for that level, but with not luck:
UBlueprint* tmpWidget = LoadObjFromPath<UBlueprint>(TEXT("WidgetBlueprint'/Game/UI/Widgets/WelcomeMenuWidget.WelcomeMenuWidget'"));
I received NULL pointer and game crashed
Path for widget, I have got using, “Copy Reference” in context menu of that widget.
Also I tryed path
. The result was the same
Also I have error
but I don’t think that that error has some relation with crash
Since you can’t quite do the same with Android, from what I can see at least, I would suggest packaging for Windows without Pak files enabled and see if the widget is actually being included. It seems like you’re running into the same issue you were with the map where it isn’t being included in the package due to the way it is being referenced. You can also ensure that it will be packaged by adding its path to the “Additional Asset Directories to include”.
I modify my package settings and try Package game without using *.pak file
also add “UI/Widgets” path to “Additional Asset Directories to Cook”
Than did package for Windows without Pak files enabled. I saw my widget allready included at path
But launch on Android platform still failed with error
That is chunk of output log with “welcomemenu” filter
As we can see, widget “WelcomeMenuWidget” already packaged.
Next image explains the next strings of Output Logs view
template <typename ObjClass>
static ObjClass* LoadObjFromPath(const FString& path)
if (path.Len() == 0)
return Cast<ObjClass>(StaticLoadObject(ObjClass::StaticClass(), NULL, *(path), NULL, LOAD_None, NULL));
that code from RAMA’s article
The shown function loads the widget from the resources. As we can see function output first and last logs.