TSlateAttribute, What it is and the difference between TAttribute

Did you notice that SWidget now has a template struct TSlateAttribute and many slate components have used this template, it should use a declare macro in header file ,and a definition macro in cpp file which should override an attribute registration function. The attribute
defined in the slate use TSlateAttribute also should use a member setter to init in the Construct() method.
Now I wanna know the advantage of using this. Forgive me, I don’t want to go deeper, the code is going to dizzy my head.

Alright for anybody who stumbles on this thread at a later point. You can find a essay on what TSlateAttribute is at “SlateAttribute.h”. Just use it over regular TAttribute is what I understand from it but if you wanna know the why then you can read the comments on that file.

5 Likes