I believe that this is happening because of a problem within USubobjectDataSubsystem::FindOrCreateAttachParentForComponent where it is creating duplicates of the character mesh because the "TestSceneComponent" has not been created yet when the first Character mesh is made. Hopefully we can solve this by adding some more checks on the adding of subobjects to make sure there are no duplicate names.
Add the following header file to you project:
#pragma once #include "CoreMinimal.h" #include "GameFramework/Character.h" #include "FooActor.generated.h" class USceneComponent; UCLASS(BlueprintType) class AFooCharacter : public ACharacter { GENERATED_BODY() AFooCharacter(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); public: UPROPERTY(EditAnywhere, BlueprintReadOnly) USceneComponent* TestSceneComp = nullptr; };
Add the following Cpp to your project:
// Copyright Epic Games, Inc. All Rights Reserved. #include "FooActor.h" #include "Components/SceneComponent.h" // Sets default values AFooCharacter::AFooCharacter(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; TestSceneComp = CreateDefaultSubobject<USceneComponent>(TEXT("TestSceneCompName")); GetMesh()->SetupAttachment(TestSceneComp); }
1. Create a BP based on FooCharacter
2. Open the blueprint
Result: There are two "CharacterMesh" skeletal mesh components, one with an incorrect attachment.
Expected: there is only one skeletal mesh, and it is attached to the "TestSceneComp"
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
My UE5-0 Directional Light is too small and not real ,please tell me how to fix it thanks
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How to achieve HLSL Multiple Render Target in Material blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-155798 in the post.
1 |
Component | UE - Gameplay - Components |
---|---|
Affects Versions | 5.0, 5.1 |
Target Fix | 5.1 |
Created | Jun 3, 2022 |
---|---|
Resolved | Sep 21, 2022 |
Updated | Oct 21, 2022 |