I have procedural level generation, so the game level is spawned at runtime. It’s not completely procedural, the designer makes Blocks which are Blueprints, which are then spawned in. The blocks have components on them that are used to spawn the other actors.
The components have a C++ base class, which inherit from a common parent extending USceneComponent. This class has:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Marker") class UBillboardComponent* BillboardComponent;
I was originally setting it with a sprite in the constructor, but that only worked in the Editor. Running standalone or trying to package crash and fail. THere are notes in the documentation that say it is not correct to initialize to assets in the constructor anyway.
So, I made the Billboard a UPROPERTY. I’d like to set this in a Blueprint base for each type of marker, so when added to an Actor Blueprint the component allready has a Billboard with a Sprite specified.
This doesn’t seem to work. The base class doesn’t accept the sprite being set, and in the instance, setting the sprite has no effect as it then isn’t rendered.