Hi,
the methods GetActorLocation and SetActorLocation can be used only with children classes of the AActor class, you can’t use them with a UStaticMeshComponent. To move a component, there are other methods in the class USceneComponent, the class from which inherits UStaticMeshComponent. For example you can use SetWorldLocation. And you need to make sure that you component has a mobility Movable. you can set that with the method SetMobility(EComponentMobility::Movable).
Can you please explain more your problem ? what do you mean exactly by data received in other class ? If you have a reference to the data in your class with the StaticMeshComponent, there is no problem you can directly use the SetWorldLocation but if you want to move the location from the other class in which you have the data, in that case you need to have a reference to your Actor with the StaticMeshComponent, then you get the desired component and move it.
To get your component you can use the existing Unreal Engine methods for example GetComponentByClass or you can simply add a Getter to you Class :
UStaticMeshComponent* YourActor::GetSuperMesh()
{
return SuperMesh;
}
to just get your StaticMeshComponent.
Hope this helps you.