I want to know how to use the style of SButton by polling. I have a pointer to where the style has been stored and now I am using a function to set it but its showing me and error message.
ButtonStyle is a SLATE_STYLE_ARGUMENT, and arguments can’t be bound to delegates like attributes can (note: there is no SLATE_STYLE_ATTRIBTUE).
SButton does have a function to manually change the style (SButton::SetButtonStyle) which is what UMG uses when updating its button widgets, however I would only use that as an absolute last resort.
It seems you just want to update an image based upon the contents of a slot? A better way to do this, rather than messing with the style of the whole button, would probably be to put an SImage inside your SButton, and then bind the Image attribute to a delegate that returns the desired FSlateBrush*.
Does that sound like something that can work for your use-case?