Description
The LengthScale
field in the HapticPattern
class is a public instance field of type System.Single
(float). It is used to scale the length of the haptic pattern, allowing for adjustments to the duration of the pattern's effect. This field can be modified to increase or decrease the overall time span of the haptic feedback.
Usage
To use the LengthScale
field, you can directly access and modify it on an instance of the HapticPattern
class. Adjusting this field will proportionally change the duration of the haptic pattern's effect.
Example
// Example of using the LengthScale field
// Create an instance of HapticPattern
HapticPattern hapticPattern = new HapticPattern();
// Set the LengthScale to adjust the duration of the haptic pattern
hapticPattern.LengthScale = 1.5f; // Increases the length by 50%
// Use the haptic pattern in your application
// This will now have a longer duration due to the LengthScale adjustment