Download

How can I chain module/plugin dependencies?

Hi, I am attempting to reuse modules across multiple applications within the same project and struggling to find a decent guide to how chained module dependencies work.

My problem: I have a UI Module, that brings in UMG. It implements a base widget that inherits from UserWidget. I then have another module that I want to take advantage of the UI Module in. I add the UIModule to the private dependencies list inside .Build.cs file. When I then extend the base widget from the UIModule, I hit compilation errors because it doesn’t know what UMG is.

If I add both UMG and UIModule to the private dependency list inside the new module it works fine. I think this must be user error and I’ve missed something as otherwise I’m going to have to add UMG to almost every module instead of just my UIModule which should bring UMG along with it!

Can anyone link me to a guide on module importing, or spot what incorrect assumption I’ve done incorrectly above?