Why my SlateWidgetStyle return me a white image?

I want to create a minimap and its boundary, so i just mimic the StrategyGame. But despite i have already set my minimap boundary image, the game still just show me a white picture. Actually it works well in the play mode, but not in the launch mode, and even i packaged my project, the problem still exists.

81790-1+(2).png

81802-2.png

Sounds like your texture isn’t being cooked. There’s an “Additional non-asset directories to package” setting under your projects advanced packaging settings. You probably just need to add the folder containing your Slate resources there.

Hello, . Thank you for helping me. I try to do what you suggest, but the problem still exists. Then i just set the texture in the construction function of my SlateWidgetStyle, problem solved. And even i choose another texture in the editor, it still can show me the right image in the play mode and the launch mode. It seem like a bug, but i don’t know why.
FRTSHUDStyle::FRTSHUDStyle()
{
FString Path = TEXT(“Texture2D’/Game/UI/HUD/MiniMap_Boundary.MiniMap_Boundary’”);
UTexture2D* Boundary = Cast(StaticLoadObject(UTexture2D::StaticClass(), NULL, *Path));
MinimapFrameBrush.SetResourceObject(Boundary);
}

Ah, I had assumed you were dealing with a file on disk, not an asset. The correct option there would have been “Additional Asset Directories to Cook”.

Are you just referencing your texture asset in the Slate style by its name? I had assumed you were since it seemed that the editor didn’t understand it was being used, so didn’t cook/package it, however your statement about choosing “another texture in the editor” makes me think you might be doing something else?