Beispiel #1
0
        public ControllerSupportResultInfo ShowControllerApplet(ControllerSupportArg controllerSupportArg, bool suspendUnityThreads)
        {
            // ControllerSupportResultInfo has two fields:
            // byte playerCount;  The number of players determined by controller support.
            // NpadId selectedId; The NpadIdType selected in single-player mode.
            var controllerSupportResultInfo = new ControllerSupportResultInfo();

            controllerSupportResultInfo.playerCount = 0;
            controllerSupportResultInfo.selectedId  = NpadId.Invalid;

#if !UNITY_EDITOR
            UnityEngine.Switch.Applet.Begin();
            ControllerSupport.Show(ref controllerSupportResultInfo, controllerSupportArg, suspendUnityThreads);
            UnityEngine.Switch.Applet.End();
#endif

            return(controllerSupportResultInfo);
        }