Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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. alt text

alt text

Product Version: UE 4.8
1 (2).png (36.8 kB)
2.png (9.8 kB)
more ▼

asked Mar 11 '16 at 06:00 PM in C++ Programming

avatar image

30 5 6 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Mar 11 '16 at 06:44 PM

avatar image

Jamie Dale STAFF
7.5k 177 67 305

avatar image EthanCS Mar 14 '16 at 05:28 AM

Hello, Jamie. 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); }

avatar image Jamie Dale STAFF Mar 14 '16 at 02:18 PM

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?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question