float TimeNormalized { get; set; }

robot_2Generated
code_blocksInput

Description

The TimeNormalized property of the AnimGraphDirectPlayback class provides the current cycle of the sequence that is currently playing. This value is normalized, meaning it ranges from 0 to 1, where 0 indicates the start of the sequence and 1 indicates the end. If no sequence is currently playing, this property will return 0.

Usage

To use the TimeNormalized property, you need to have an instance of the AnimGraphDirectPlayback class. You can access this property to determine the progress of the currently playing animation sequence.

Example

// Assuming 'animPlayback' is an instance of AnimGraphDirectPlayback
float currentCycle = animPlayback.TimeNormalized;
if (currentCycle == 0)
{
    // No sequence is currently playing
}
else
{
    // Use the currentCycle value to determine the progress
    Console.WriteLine($"Current cycle: {currentCycle}");
}