- Home /
Trouble getting XInput set up
I'm having toruble setting up XInputdotnet on my unity project.I have the XInputDotNetPure.dll in my plugins folder and the XInputInterface.dll in the root of the project but when I'm trying to right my controller class it doesn't recognize PlayerIndex or GamePadState. Here is the barebones of my controller class so far.
using UnityEngine;
using System.Collections;
using XInputDotNetPure;
public class Controller : MonoBehaviour {
private bool player1IndexSet = false;
private bool player2IndexSet = false;
private PlayerIndex player1Index;
private PlayerIndex player2Index;
private GamePadState state1;
private GamePadState state2;
private GamePadState prev1State;
private GamePadState prev2State;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
UPDATE: Unity is no longer telling me there's errors with this after just reopening the scene and solution and whatnot. However $$anonymous$$onoDevelop is still saying that playindex and gamepadstate don't exist.
Your answer
![](https://koobas.hobune.stream/wayback/20220613140932im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
XInput: how do I access vibration on 360 controller? 3 Answers
How to make 3d models solid. 3 Answers
Quiz game using unity or ngui 1 Answer
PIckUp the flashlight 1 Answer
How to create a plugin in unity from using eclipse IDE 0 Answers