This might have been answered before, but my problem is a little bit more complicated. I'm porting some WW2 warship models and they have lots of different small models like cranes, anchors, lifeboats and whatnot. Each one of those models has its own material, making it absurdly complicated to export them all as textures one by one.
This is the problem I'm currently facing, as you can see on the right there are dozens of individual materials, and my goal is to join them all into a single one if possible so I don't have to export them one by one: