I have a C++ class that extends USceneComponent. On it, I have a property for a UTimelineComponent like so:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UTimelineComponent* TransitionTimeline;
I am then creating a Blueprint version of this class, and I want to be able to create the actual Timeline component in the Blueprint class, and for the above property to point to it. I can do this manually by doing something like this on the BP BeginPlay():
https://i.imgur.com/ImJn679.png
But I would much rather have this set up in C++. The issue is, I don’t know how to get hold of this BP-created timeline and point to it in C++.
UTimelineComponent is an UActorComponent, but my USceneComponent-derived class doesn’t seem to be able to get hold of ActorComponents attached to it. There is a GetChildrenComponents method, but it only returns attached USceneComponents so it doesn’t find the UTimelineComponent.
How can I do this?