Hi,
I’d like to know how (if possible), to get the UV channel index used on a StaticMesh from a UStaticMeshComponent. What I am trying to do is raycast and then, from the FHitResult get the UV coordinates to know where on a texture it is hit. I can use the function FindCollisionUV
to get the coordinates but it requires the UV channel index as input. From the Hit result you also get the StaticMeshComponent that is hit. Is there a way to get the UV channel index for it? Or a list of channel indices on which I can check which index I need?
From the API I can see there is the GetMaterialStreamingData
function which returns a FPrimitiveMaterialInfo
object. This object has a UVChannelData
attribute which is a FMeshUVChannelInfo
object. However it does not seem to contain the used channel index.