Hey
I’ve tried it with SetUpAttachment(…), AttachTo(…) and AttachToComponents(…) with different parameters. I didn’t work.
Meanwhile, I created the icon widget in the blueprint instead of creating it in C++.
When I have the time I take a look into the Unreal source code and find out what are they doing when I create a WidgetComponent in the blueprint. And find the missing parameters or differences.
It’s a little bit bugging me, that I can’t find the solution
UCLASS(Blueprintable)
class SRS_API ACarAssetActor : public AActor, public ICarIActor
{
GENERATED_BODY()
public:
ACarAssetActor ();
...
// Widget component
UPROPERTY(Blueprintable, EditAnywhere, BlueprintReadWrite)
UWidgetComponent* IconWidget;
..
}
Regards Gerrit.