/Engine/Plugins/Experimental/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshMaterialFunctions.h
if the mesh is not Triangle-Compact (eg GetHasTriangleIDGaps == false) then the returned list will also have the same gaps where the number -1 will be recorded for any missing Triangle IDs.
static [UDynamicMesh](API\Runtime\GeometryFramework\UDynamicMesh) * GetAllTriangleMaterialIDs ( [UDynamicMesh](API\Runtime\GeometryFramework\UDynamicMesh) * TargetMesh, [FGeometryScriptIndexList](API\Plugins\GeometryScriptingCore\GeometryScript\FGeometryScriptIndexList) & MaterialIDList, bool & bHasMaterialIDs )