Example:
using UnityEngine;
using UnityEngine.InputSystem;
using System.Timers;
public class myBox: MonoBehaviour
{
private Timer timer = new Timer(500);
void Awake()
{
timer.Elapsed += timer_Elapsed;
timer.Start();
}
private void timer_Elapsed(object sender, ElapsedEventArgs e)
{
Debug.Log("timer_Elapsed, Gamepad.current.SetMotorSpeeds(1f, 1f)");
Gamepad.current.SetMotorSpeeds(1f, 1f);
}
}
Expected behaviour:
The string “StopTimer_Elapsed, Gamepad.current.SetMotorSpeeds(1f, 1f)” is printed
Game pad vibration is activated
Actual behaviour:
The string “StopTimer_Elapsed, Gamepad.current.SetMotorSpeeds(1f, 1f)” is printed
Game pad vibration is NOT activated
Notes:
Not related to the game pad, the game pad vibration is activated as expected when the call to Gamepad.current.SetMotorSpeeds is made from other methods.