The Length
property of the HapticPattern
class represents the duration of the haptic pattern in seconds. This property is a float
value and is used to determine how long the haptic feedback should last when the pattern is played.
The Length
property of the HapticPattern
class represents the duration of the haptic pattern in seconds. This property is a float
value and is used to determine how long the haptic feedback should last when the pattern is played.
To use the Length
property, you can access it directly from an instance of the HapticPattern
class. This property is read-only and provides the total duration of the haptic pattern.
// Example of accessing the Length property of a HapticPattern HapticPattern pattern = new HapticPattern(); float duration = pattern.Length; // Output the duration of the haptic pattern // Note: Replace with appropriate logging or UI display method // e.g., Debug.Log(duration);