Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Engine/Source/Developer/AssetTools/Private/AssetTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,10 +1167,10 @@ void UAssetToolsImpl::ImportAssetTasks(const TArray<UAssetImportTask*>& ImportTa
Params.bAutomated = ImportTask->bAutomated;
Params.SpecifiedFactory = ImportTask->Factory;
Filenames[0] = ImportTask->Filename;
TArray<UObject*> ImportedObjects = ImportAssetsInternal(Filenames, ImportTask->DestinationPath, nullptr, Params);
ImportTask->Result = ImportAssetsInternal(Filenames, ImportTask->DestinationPath, nullptr, Params);

PackagesToSave.Reset(1);
for (UObject* Object : ImportedObjects)
PackagesToSave.Reset(ImportTask->Result.Num());
for (UObject* Object : ImportTask->Result)
{
ImportTask->ImportedObjectPaths.Add(Object->GetPathName());
if (ImportTask->bSave)
Expand Down Expand Up @@ -2067,6 +2067,7 @@ TArray<UObject*> UAssetToolsImpl::ImportAssetsInternal(const TArray<FString>& Fi
Factory->SetAssetImportTask(Params.AssetImportTask);

ImportAssetType = Factory->ResolveSupportedClass();

UObject* Result = Factory->ImportObject(ImportAssetType, Pkg, FName(*Name), RF_Public | RF_Standalone | RF_Transactional, Filename, nullptr, bImportWasCancelled);

Factory->SetAutomatedAssetImportData(nullptr);
Expand Down
17 changes: 10 additions & 7 deletions Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1747,17 +1747,20 @@ void USceneComponent::SetRelativeRotationCache(const FRotationConversionCache& I

void USceneComponent::SetupAttachment(class USceneComponent* InParent, FName InSocketName)
{
if (ensureMsgf(!bRegistered, TEXT("SetupAttachment should only be used to initialize AttachParent and AttachSocketName for a future AttachToComponent. Once a component is registered you must use AttachToComponent.")))
if (InParent != AttachParent || InSocketName != AttachSocketName)
{
if (ensureMsgf(InParent != this, TEXT("Cannot attach a component to itself.")))
if (ensureMsgf(!bRegistered, TEXT("SetupAttachment should only be used to initialize AttachParent and AttachSocketName for a future AttachToComponent. Once a component is registered you must use AttachToComponent. Component [%s] Owner [%s], InParent [%s], InSocketName [%s]"), *GetFullName(), *GetPathNameSafe(GetOwner()), *GetNameSafe(InParent), *InSocketName.ToString()))
{
if (ensureMsgf(InParent == nullptr || !InParent->IsAttachedTo(this), TEXT("Setting up attachment would create a cycle.")))
if (ensureMsgf(InParent != this, TEXT("Cannot attach component %s to itself."), *GetFullName()))
{
if (ensureMsgf(AttachParent == nullptr || !AttachParent->AttachChildren.Contains(this), TEXT("SetupAttachment cannot be used once a component has already had AttachTo used to connect it to a parent.")))
if (ensureMsgf(InParent == nullptr || !InParent->IsAttachedTo(this), TEXT("Attaching %s to %s would create a cycle."), *GetFullName(), *InParent->GetFullName()))
{
SetAttachParent(InParent);
SetAttachSocketName(InSocketName);
bShouldBeAttached = AttachParent != nullptr;
if (ensureMsgf(AttachParent == nullptr || !AttachParent->AttachChildren.Contains(this), TEXT("SetupAttachment cannot be used once a component has already had AttachTo used to connect it to a parent. %s is already attached to %s"), *GetFullName(), *AttachParent->GetFullName()))
{
SetAttachParent(InParent);
SetAttachSocketName(InSocketName);
bShouldBeAttached = AttachParent != nullptr;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ void FSlateApplication::AddModalWindow( TSharedRef<SWindow> InSlateWindow, const
UE_LOG(LogSlate, Warning, TEXT("A modal window tried to take control while running in unattended script mode. The window was canceled."));
if (FPlatformMisc::IsDebuggerPresent())
{
UE_DEBUG_BREAK();
// UE_DEBUG_BREAK();
}
else
{
Expand Down
Loading