"Set Brush From Sprite" function for UMG Image

Support for Paper2D sprites in UMG was added in 4.13 which is great but there’s no easy way of dynamically changing which sprite an Image uses.

Images currently have SetBrushFromTexture, SetBrushFromMaterial, and SetBrushFromAsset functions but are missing a SetBrushFromSprite function. I’ve gotten around this by making a SlateBrush for each sprite I want to use in UMG but it would be nice if I didn’t have to do that.

Hey kgamble. I ran into this issue myself and looked around for solutions. Your workaround does the trick, but I wanted to point out that there is an active feature request for it here:

https://issues.unrealengine.com/issue/UE-35610

Consider voting for it, like I did, to increase the chance of it getting picked and implemented.