Get all available materials in packaged game

I have a folder in my project that I’m adding to the ‘Additional Asset Directories to Cook’ project settings array. This folder could contain any number of materials, and I wanted to make sure they all got packaged with the game

All I would like to do is return an array of all available materials in the game so I can start applying these to some procedural mesh components at runtime

Is there a build in function I’ve missed to get this?

Thanks

I ended up using the UObjectLibrary to do this in the end

   auto Library = UObjectLibrary::CreateLibrary(MaterialClass, true, GIsEditor);

   Library->LoadAssetDataFromPath(Path);

   TArray<FAssetData> Assets;
   Library->GetAssetDataList(Assets);

   for (auto& Asset : Assets)
   {
      UMaterial* mat = Cast<UMaterial>(Asset.GetAsset());
   }