If a UPaperSpriteComponent is declared in a Scene Component class and the Scene Component is added as a component to a Pawn class, creating a blueprint of the Pawn and setting the Paper Sprite causes the asset set to be lost when the blueprint is compiled.
#include "PaperSpriteComponent.h"
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) UPaperSpriteComponent* MySprite;
MySprite = CreateDefaultSubobject<UPaperSpriteComponent>(TEXT("MySprite"));
UPROPERTY(EditAnywhere, BlueprintReadOnly)
USceneComponent* RootSceneComponent;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
class UMySceneComp* MyComponent;
#include "MySceneComp.h"
RootSceneComponent = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent")); RootComponent = RootSceneComponent; MyComponent = CreateDefaultSubobject<UMySceneComponent>(TEXT("MyComponent"));
Result:
The Background sprite disappears from the viewport and must be removed / readded
Expected:
Compiling blueprint retains reference to set asset.
Head over to the existing Questions & Answers thread and let us know what's up.
3 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.13 |
Created | Sep 8, 2016 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |