You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
GetNumPluggedCtrlrs() returns the number of Xbox controllers plugged into the computer. If on Windows, XInput's record keeping is used to look for connected Xbox controllers. On other platforms, XCI counts joysticks that have "Xbox", "XBOX", or "Microsoft" in its name.
Example
usingUnityEngine;usingXboxCtrlrInput;publicclassExample:MonoBehavior{voidStart(){intnumOfCtrlrs=XCI.GetNumPluggedCtrlrs();Debug.Log("There are "+numOfCtrlrs+" Xbox controllers plugged in.");}}