Slate: FMargin instance for Slot Padding

Hi all,

well i just cant figure out how to make an UPROPERTY()
having a FMargin ‘myMargin’ inside my SlateStyle to use in Widget.

and trying to access that in my Widget
with



SNew(SOverlay)
+ SOverlay::Slot()
.Padding(&Style->myMargin)


but i get this error:



error C2664: 'FMargin::FMargin(const FMargin &)' : cannot convert argument 1 from 'const FMargin *const ' to 'float'	D:\Apps\Epic Games\4.5\Engine\Source\Runtime\Core\Public\Misc\Attribute.h

since its working so nice with Brushes i thought it could be the same with that, since padding accepts TAttribute as a param.

However if i do it like this:



SNew(SOverlay)
+ SOverlay::Slot()
.Padding(FMargin(/*some values*/)


everything works fine. Im sure i missed something :slight_smile:

any help?

-SOLVED-

delete the & from Style…



SNew(SOverlay)
+ SOverlay::Slot()
.Padding(Style->myMargin)