i have a question about using timeline in c++. Before using the timeline, we have to call the function AddInterpFloat. but i dont know the third param PropertyName is for what. even i pass the NAME_None, the timeline can still work.
look forward to your guidance. thanks so much!
Hey G_una_y,
that’s the Property Name of the Float Track of the curve
The Struct FTimelineFloatTrack looks like this:
//TimelineComponent.h
/** Struct that contains one entry for each vector interpolation performed by the timeline */
USTRUCT()
struct FTimelineFloatTrack
{
GENERATED_USTRUCT_BODY()
/** Float curve to be evaluated */
UPROPERTY()
class UCurveFloat* FloatCurve;
/** Function that the output from ValueCurve will be passed to */
UPROPERTY()
FOnTimelineFloat InterpFunc;
/** Name of property that we should update from this curve */
UPROPERTY()
FName FloatPropertyName;
/** Cached float property pointer */
UPROPERTY(transient)
UFloatProperty* FloatProperty;
/** Static version of FOnTimelineFloat, for use with non-UObjects */
FOnTimelineFloatStatic InterpFuncStatic;
FTimelineFloatTrack()
: FloatCurve(NULL)
, FloatPropertyName(NAME_None)
, FloatProperty(NULL)
{
}
};
The name is maybe there because it’s easier to search for a specific Track in the Timeline.
Greetings
thanks !
No Problem
I’m glad I could help you