Hello. I’m having a bit of trouble duplicating actors in my scene. When I duplicate my actor, there are couple of errors I encountered. First the mesh was not visible no matter how I change its static mesh component, 2nd one is when I pressed “F” key, the camera does not zoom in to the actor and when i press “Ctrl + W” it just resets to (0,0,0). But the weird thing is when I drag the Blueprint from the content browser to the level it’s fine.
I have a actor created in c++ and override its PostEditChangeProperty function. the things it do is it automatically sets the static mesh based on the variable of the actor.
void AItemProvider::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
if (ItemClass == nullptr)
return;
UItem* defaultItem = ItemClass.GetDefaultObject();
if(defaultItem->GetStaticMesh() != nullptr && Mesh->GetStaticMesh() != defaultItem->GetStaticMesh())
Mesh->SetStaticMesh(defaultItem->GetStaticMesh());
}
Does anybody know what’s causing this?