If a static mesh component is added to a scene component class and the scene component is added to an actor - the static mesh that is assigned in the blueprint will not show up in the blueprint editor or the main editor viewport.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) class USpringArmComponent* IndicatorArm; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) class UStaticMeshComponent* IndicatorMesh;
IndicatorArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("IndicatorArm")); IndicatorArm->AttachTo(this); IndicatorArm->TargetArmLength = 150.0f; IndicatorArm->bUsePawnControlRotation = false; IndicatorArm->SetHiddenInGame(false); IndicatorMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("IndicatorMesh")); IndicatorMesh->AttachTo(IndicatorArm); IndicatorMesh->bOnlyOwnerSee = true; IndicatorMesh->SetSimulatePhysics(false); IndicatorMesh->SetCastShadow(false);
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = BallIndicator)
class UMyScene* BallIndicatorComp;
BallIndicatorComp = CreateDefaultSubobject<UMyScene>(TEXT("BallIndicatorComp"));
BallIndicatorComp->AttachTo(RootComponent);
Result:
No mesh appears in the viewport
Expected:
Mesh appears in blueprint/editor viewport after being set
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
为什么我的电脑无法安装ue,错误代码一直是IS-IN-BV05,该如何解决
UEFN CRASHING WHEN LAUNCHING SESSION
Why am i getting this warning when I try "download and place" in Populate/Urban?
Error EU-FA-31003 when trying to download the new preview
my UEFN wont lunch it say Failed to open descriptor file ../../../FortniteGame/FortniteGame.uproject
How to convert the datasmith scene file to BluePrint. Create animations in BluePrint.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Gameplay - Components |
---|---|
Affects Versions | 4.9.2 |
Created | Nov 6, 2015 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |