[Closed] Slate resource preloading
I have a working interface with Slate. However, I notice that the first loading of some brushes can be visible. For example, a button with a brush on SetHovered() will noticeably flash the first time you hover onto it. After that, it works like a charm.
I took a look at the GetResources() method, I listed all my brushes here. Is there anything more to do ?
The code here shows the beginning of my Construct() method.
Now the FSButtonStyle code :
What am I doing wrong ?
The question has been closed Apr 28 '15 at 07:43 AM by StrangerGwenn for the following reason:
The question is answered, right answer was accepted
MattK has taken a look at this and found a bug in the Slate resource loading that was leading to a one frame delay between requesting the texture, and the texture actually being used.
This fix will be in 4.2, however it's small, and if you're building from source you can try it out yourself before then.
Open up SlateRHIResourceManager.cpp (UE4\Engine\Source\Runtime\SlateRHIRenderer\Private).
Inside the constructor for FDynamicTextureResource, add the following line:
Inside FSlateRHIResourceManager::InitializeDynamicTextureResource, remove the following line:
answered Apr 15 '14 at 05:14 PM
Jamie Dale STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here