I’ve got a UStaticMeshComponent that is the meshfrom my weapons. Currently in my weapon code I’ve overriden the SetActorHiddenInGame(bool bNewHidden) and tried to do this:
void AMechAttachment::SetActorHiddenInGame(bool bNewHidden)
{
Super::SetActorHiddenInGame(bNewHidden);
meshComponent->SetHiddenInGame(bNewHidden, true);
meshComponent->SetVisibility(!bNewHidden, true);
}
for some reason this doesn’t hide the mesh at all.
Any ideas?
Full classes in: https://github.com/belven/Mech_RPG/blob/master/Mech_RPG/MechAttachment.cpp