internal static void SetupInternal() { if (isSetup) { return; } Platform = (SystemInfo.operatingSystem + " " + SystemInfo.deviceModel).ToUpper(); initialTime = 0.0f; currentTime = 0.0f; lastUpdateTime = 0.0f; currentTick = 0; inputDeviceManagers.Clear(); devices.Clear(); Devices = new ReadOnlyCollection <InputDevice>(devices); activeDevice = InputDevice.Null; isSetup = true; #if UNITY_STANDALONE_WIN || UNITY_EDITOR if (enableXInput) { XInputDeviceManager.Enable(); } if (enablePS4Win) { PS4WinDeviceManager.Enable(); } #endif if (OnSetup != null) { OnSetup.Invoke(); OnSetup = null; } var addUnityInputDeviceManager = true; #if UNITY_ANDROID && INCONTROL_OUYA && !UNITY_EDITOR addUnityInputDeviceManager = false; #endif if (addUnityInputDeviceManager) { AddDeviceManager <UnityInputDeviceManager>(); } }
public static void Enable() { var errors = new List <string>(); if (PS4WinDeviceManager.CheckPlatformSupport(errors)) { InputManager.HideDevicesWithProfile(typeof(PlayStation4WinProfile)); InputManager.AddDeviceManager <PS4WinDeviceManager>(); } else { foreach (var error in errors) { Logger.LogError(error); } } }