How to set the static mesh component of a new actor to that of a stored pointer to static mesh component in C++

I’m busy working on an inventory system. When I pick an item up I store all the variables I need into a new UObject class and wait for it to be dropped. When I drop it I create a new AActor in the world and start applying all the properties. The big problem I’ve been having for the past few days is trying to set the static mesh component of the new actor to the one I have stored. All I’ve managed to do is set the static mesh but then I lose all the materials and physics properties etc. If it helps the static mesh component is created when the AActor object is first created.