Hi,
I’m trying to use skeletal mesh to display a preview and exist in editor only. Is there any way to do that?
I tried to create my mesh in OnConstruction(), that is only called in editor, but by registering the component in there, it get added to my actor and is then saved and displayed in-game.
I don’t want to delete them in BeginPlay() as that would mean they will still be saved/loaded. Is there a cleaner way to do this?
For more background info, what I am trying to do is setup a team actor with blueprint of the character that will be inside this team. I don’t want the character to be saved in the map because they would be spawned under certain condition only. What I want is a preview in editor of what the team will look like, by getting the skeletal mesh in the blueprint default object and displaying it in editor.
The code I wrote in OnConstruction() look like this:
USkeletalMeshComponent* NewMesh = NewObject<USkeletalMeshComponent>(this);
SoldierVisuals.Add(NewMesh);
NewMesh->SetupAttachment(RootComponent);
NewMesh->RegisterComponent();