Share utility across multiple Build.cs files

raulalbertog
Mon, 04 Aug 2025 17:18:22 +0000
C++

As the title suggests, I would like to know if it’s possible to reuse a utility function across different Build.cs files.

To provide some context, I have a plugin that depends on other 5 modules.

Each module has its own Build.cs file, but I have 2 utility functions that use reflection to find some particular methods on the DLLs.

Right now, those functions exist in every Build.cs file and they’re quite lengthy, so I would like to avoid having this duplicated code across all files, I was thinking on moving the functions to a separate Utilities.cs file and be able to import it in every Build.cs file and just call the functions. But it seems that the Unreal Build Tool is not able to find it.

Any suggestions?

1 post - 1 participant