public override bool InitAllControllers() { // It only works in windows. if (Application.platform != RuntimePlatform.WindowsEditor && Application.platform != RuntimePlatform.WindowsPlayer ) { return(false); } // impl = new XInputPlugin.Impl(pluginVersion); // bool ret = base.InitAllControllers(); if (ret) { if (!IsConnected(0)) { return(false); } controllers = new XboxController[1] { new XboxController(this, "XboxController", 0) }; } return(ret); }
public override bool DeinitAllControllers() { if (impl != null) { impl.Dispose(); impl = null; } return(base.DeinitAllControllers()); }