From c96f80e75cb14c06c27cfd73511b58c0c003da85 Mon Sep 17 00:00:00 2001 From: donghaiwang Date: Sat, 11 Jul 2026 15:50:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=83=E8=AF=95mujoco?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=AF=BC=E5=85=A5=E6=97=B6=E6=84=8F=E5=A4=96?= =?UTF-8?q?=E7=9A=84=E6=96=AD=E7=82=B9=E5=81=9C=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Slate/Private/Framework/Application/SlateApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp b/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp index 0be36dab4..9b3a41a07 100644 --- a/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp +++ b/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp @@ -1874,7 +1874,7 @@ void FSlateApplication::AddModalWindow( TSharedRef 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 { From a9512e24f7c969f84c7cb0bdc26804441dd01b03 Mon Sep 17 00:00:00 2001 From: donghaiwang Date: Sat, 11 Jul 2026 15:54:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96mujoco?= =?UTF-8?q?=E7=9A=84.glb=E6=A8=A1=E5=9E=8B=E5=AF=BC=E5=85=A5=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=BB=93=E6=9E=9C=EF=BC=88ImportTask->Result=EF=BC=89?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 从 UE5 引入:https://github.com/EpicGames/UnrealEngine/commit/9e1786b97b3e986a4034cf5d3aeeeeb0cd028fb4 --- Engine/Source/Developer/AssetTools/Private/AssetTools.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Engine/Source/Developer/AssetTools/Private/AssetTools.cpp b/Engine/Source/Developer/AssetTools/Private/AssetTools.cpp index a0fada895..af1e50a8a 100644 --- a/Engine/Source/Developer/AssetTools/Private/AssetTools.cpp +++ b/Engine/Source/Developer/AssetTools/Private/AssetTools.cpp @@ -1167,10 +1167,10 @@ void UAssetToolsImpl::ImportAssetTasks(const TArray& ImportTa Params.bAutomated = ImportTask->bAutomated; Params.SpecifiedFactory = ImportTask->Factory; Filenames[0] = ImportTask->Filename; - TArray 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) @@ -2067,6 +2067,7 @@ TArray UAssetToolsImpl::ImportAssetsInternal(const TArray& 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); From 972c58658e46f5d0f4f3ed0da8434e6208e91d00 Mon Sep 17 00:00:00 2001 From: donghaiwang Date: Sun, 12 Jul 2026 22:22:39 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BB=A5=E4=BE=BF=E6=9B=B4=E5=A5=BD=E5=9C=B0=E4=BA=86=E8=A7=A3?= =?UTF-8?q?=20bug=20=E7=9A=84=E8=BF=90=E8=A1=8C=E6=83=85=E5=86=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用vs调试打开虚幻编辑器,第一次打开 mujoco 导入的蓝图时也会在在这一行报错并停止调试,继续运行不影响。但是打包会报错: “LogOutputDevice: Error: SetupAttachment cannot be used once a component has already had AttachTo used to connect it to a parent.” [ue5] https://github.com/EpicGames/UnrealEngine/commit/ffc8fad05202d1b488e1440ec7a6c563525e862a --- .../Source/Runtime/Engine/Private/Components/SceneComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp b/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp index 3f1a9b030..03a95d90d 100644 --- a/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp +++ b/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp @@ -1747,7 +1747,7 @@ 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 (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. Owner [%s], InParent [%s], InSocketName [%s]"), *GetPathNameSafe(GetOwner()), *GetNameSafe(InParent), *InSocketName.ToString())) { if (ensureMsgf(InParent != this, TEXT("Cannot attach a component to itself."))) { From d783d7ce17f1421f19a4b03908c4537bd6280142 Mon Sep 17 00:00:00 2001 From: donghaiwang Date: Mon, 13 Jul 2026 08:37:08 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[ue5]=20=E4=BF=AE=E5=A4=8D=E5=9C=A8?= =?UTF-8?q?=E5=B7=B2=E5=85=B7=E6=9C=89=20AttachParent=20=E7=9A=84=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E8=B0=83=E7=94=A8=20SetupAttachment()=20?= =?UTF-8?q?=E6=97=B6=E5=87=BA=E7=8E=B0=E7=9A=84=E8=AF=AF=E6=8A=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=88=E5=B7=B2=E9=99=84=E7=9D=80=E5=9C=A8=E7=88=B6?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=8A=E7=9A=84=E7=BB=84=E4=BB=B6=E8=BF=98?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E8=B0=83=E7=94=A8=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=99=84=E7=9D=80=EF=BC=8C=E4=B9=9F=E5=B0=B1=E6=98=AF=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E7=BB=84=E4=BB=B6=E4=B8=8D=E8=83=BD=E6=9C=89=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E7=88=B6=E7=BB=84=E4=BB=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参考:https://github.com/EpicGames/UnrealEngine/commit/e38b96cd1578967ccee95cbba61733b6371d4fab --- .../Private/Components/SceneComponent.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp b/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp index 03a95d90d..16bb229fc 100644 --- a/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp +++ b/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp @@ -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. Owner [%s], InParent [%s], InSocketName [%s]"), *GetPathNameSafe(GetOwner()), *GetNameSafe(InParent), *InSocketName.ToString())) + 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; + } } } }