How do I get the building descriptor of a building that's not unlocked yet?
First, I used a Recipe Manager to get all recipes. I grouped them by "Get Produced In" which gives me a set of ~8 buildables (FGBuildable Class Reference). I then used the Recipe Manager's "Find Building Descriptor by Class", but it only returns Building Descriptors (FGBuildingDescriptor Class Reference) for constructor and assembler because those are the only buildings I can actually build in the game (things like the Manufacturer are not unlocked yet).
However, in my mod I would like to show icons of all available machines even if they're not unlocked yet. Do you have any idea how to achieve that?
However, in my mod I would like to show icons of all available machines even if they're not unlocked yet. Do you have any idea how to achieve that?


Solution
Use
FindNativeClassesByType of class FGRecipe, it returns all recipes, unlocked or not. Note that there are still a few broken recipes in game (and possibly included with some mods), so you'll want to do IsValid checks on all recipes and descriptors before calling functions on them because they might be null or have have null data in them.