Hi,
quick question. I just created a new project with simple UMG UI – child class of UUserWidget (with meta=(BindWidget)) and Widget blueprint, but I forgot to add the “UMG” dependency to Build.cs file. But it all compiled and worked just fine anyway… Why is that?
My guess is probably because I have “Engine” in public dependencies and it has “UMG” in it’s private dependencies? (and also CircularlyReferencedDependentModules – I have no idea what that is)
If it’s the case, why does every documentation instruct us to add the dependency ourself if it’s included anyway? Just a good practice, in case you would remove the Engine dependency or something? But if that’s the case, shouldn’t we explicitly add everything else Engine.Build.cs adds if we use it?
Also should Slate and SlateCore be explicitly included when UMG is used as UMG is built on top of Slate? Some guides (like the official one) do add it but most don’t. “UMG” depends on “Slate” and “Slate” depends on “SlateCore”, so technically only “UMG” dependency is needed. But if you add it as good practice, why don’t you also add “Json”, for example, as it’s also “Slate”'s dependency…?
None of this probably really matters, but I’m really new to Unreal Engine, and I’m just curios for educational perposes
I feel like a reasonable option would be to explicitly include everything I do use directly in my code – so if I do directly use any class from “UMG”, I should add it. But that does not go along with the official documentation, where they add “Slate” and “SlateCore” even though they use classes just from UMG…
What’s your opinion? What do you explicitly include in your projects?