You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to export and import the meshes into .obj files with the functions RTGUtils::WriteOBJMesh and URuntimeToolsFrameworkSubsystem::ImportMeshSceneObject respectively. But When I have done a boolean operation with 2 objects namely A and B, the WriteOBJMesh function is only giving me the original mesh A. I want to write the final mesh to an OBJ file.
This is my code for writing the obj files:
void AToolsFrameworkPlayerController::WriteMeshesToDrive() const
{
TArray<TObjectPtr<AActor>> OutActors;
UGameplayStatics::GetAllActorsOfClass(this, ADynamicSDMCActor::StaticClass(), OutActors);
for (TObjectPtr<AActor> Actor : OutActors)
{
if (TObjectPtr<ADynamicSDMCActor> DynamicSdmcActor = Cast<ADynamicSDMCActor>(Actor))
{
FString Path = FPaths::ProjectContentDir() + FGuid::NewGuid().ToString(EGuidFormats::DigitsWithHyphens) + TEXT(".obj");
UE_LOG(LogTemp, Warning, TEXT("Exporting Mesh to path %s with status %d"), *Path,
RTGUtils::WriteOBJMesh(Path, DynamicSdmcActor->GetMeshRef(), true));
}
}
}
I am looking for a way to save the meshes generated to the drive and load it back
The text was updated successfully, but these errors were encountered: