All of the guides I read regarding adding slate style follow a really complex method of creating a style class and linking them with game module etc steps like that.
I tried something much easier and was successful but why is no one using this method? Does it create leaks or something of that sort?
Well, basically you can write a whole game in one file, but you don’t do it, do you?
It’s just a matter of project structure. Of course, if you have just a couple of windows you can set everything in HUD class. Download Shooter game and look at its interface, how complex it is. And how well-ordered it is at the same time. It’s so easy to read and understand it. Not only code should be structured but your editor assets too. It would be much better if your WidgetStyle assets were in dedicated folder all named and ordered. Easy to edit, easy to debug. Easy to work with. What if your designer doesn’t know C++ and wants just to add another style based on some template you did? Should he ask programmers to give up their current task and add another property to HUD class? This totally ruins whole division of labor principle.