How can I access instance in Hierarchical Instanced Static Mesh?

I’ve a HISMC attached that contains a list of instanced actor. Is there a way for me to access the individual instances and update their position?

Something like this?

int instanceIndex = 1;
FTransfrom newTransfrom = FTransform(FVector(0, 0, 100));
bool worldSpace = true;
bool renderStateDirty = true;
yourInstancedMeshComponentBase->UpdateInstanceTransform(instanceIndex , newTransfrom , worldSpace , renderStateDirty );

this works for UInstancedStaticMeshComponents so I think it would work for UHierarchicalInstancedStaticMeshComponents as well

Now please could you tell me if you included a header for or something to get the UHierarchicalInstancedStaticMeshComponent to work? I get an error saying that Unreal doesn’t know about the class and I cant find a fix anywhere :frowning:

I know this is old, but #include "Components/HierarchicalInstancedStaticMeshComponent.h"