Hi,
Yes, I assume we know how to use the interchange import. Here is some sample code we use:
UInterchangeManager* ImportManager = UInterchangeManager::GetInterchangeManagerScripted();
UInterchangeSourceData* SourceData = ImportManager->CreateSourceData(InFilePath);
FImportAssetParameters ImportAssetParams;
ImportAssetParams.bIsAutomated = true;
// ImportAssetParams.OverridePipelines = ImportPipelines;
ImportAssetParams.OnAssetsImportDone.BindUFunction(this, "OnAssetsImportDone");
ImportManager->ImportAsset("/Game/ImportedAssets", SourceData, ImportAssetParams);
void AImportedActor::OnAssetsImportDone(const TArray<UObject*>& Objects)
{
for (int i = 0; i < Objects.Num(); i++)
{
if(Object[i])
{
UStaticMesh* ImportedStaticMesh = Cast<UStaticMesh>(Objects[i]);
if (ImportedStaticMesh)
{
this->GetStaticMeshComponent()->SetStaticMesh(ImportedStaticMesh);
}
}
}
}
It works fine if we import a single mesh, like a chair or a sofa. When importing whole scenes with gltf, that’s when problems happen. We also use the datasmith interchange “Load file” function, but it just crashes the packaged game or gives us bad results.
Main problem is, basically non of the runtime importing pipelines work anymore in 5.3 to import whole scenes, because it is either crashing, or the materials are missing.
It also seems like that whe importing a single mesh, it does not have collision.