get all devices connected using player input manager unity

Code Example - get all devices connected using player input manager unity

                
                        //You dont get devices via PlayerInputManager, but by InputSystem.
InputSystem.devices;
                    
                
 

get device connected to player input unity

                        
                                using UnityEngine.InputSystem;
PlayerInput device = playerInput.devices[0];