C++: Object Reference is not compatible with created node

Mesh is SkeletalMeshComponent.
You’ve declared SkeletalMesh.
You need to change your function declaration or input a skeletalmesh to the input pin.
You can retrieve the SkeletalMesh from your Mesh