Files
Darklings-FightingGame/Assets/_Project/Scripts/InputDetector.cs
2021-09-29 16:43:00 +02:00

26 lines
558 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputDetector : MonoBehaviour
{
public void DeviceRegained(PlayerInput playerInput)
{
Debug.Log("Regained: ");
for (int i = 0; i < playerInput.devices.Count; i++)
{
Debug.Log("Regained: "+ playerInput.devices[i].name);
}
}
public void DeviceLost(PlayerInput playerInput)
{
Debug.Log("Lost: ");
for (int i = 0; i < playerInput.devices.Count; i++)
{
Debug.Log("Lost: " + playerInput.devices[i].name);
}
}
}