Found it quite annoying to create different Foliage components for each different tree. There’s no way to access Constructor for the Foliage Actor or Instances in Foliage.
Its also not possible to SetCustomDataValue of the foliage in the editor in any other way.
So this is the best alternative I could find so far.
1- Place all the trees in a Texture2DArray.
2- Extend the C++ FoliageInstancedStaticMeshComponent.
3- Use one of the parameters, that will then do the math in C++ to convert it to Custom Data Floats of each instance.
Voir sur youtube