Closed maakep closed 7 years ago
You do not need to do those instructions anymore with Unity 5. Just delete everything you had that is related XInput.NET in your project (delete outside of Unity), then import the package again.
I updated README.md and the instructions on the release page.
Also note that because you're using an earlier version of Unity than 5.6.0f3, you might need to update the plugin settings to the ones described on the README page.
I see. Well I did those things, and it seemingly didn't work. I can try to upgrade Unity to your version and try again.
These are the steps I followed:
Assets/XInputDotNet/Plugins/...
)Result: Could not resolve this reference. Could not locate the assembly.
This is solved in the 3rd step when importing the old release, even if you can't build because the Platform settings are wrong you can still use the assembly, which I cannot with the new release. It seems to not be registered as an assembly for some reason.
There's definitely something strange going on. I'm investigating.
Could you try this please? https://github.com/speps/XInputDotNet/releases/tag/v2017.04-2
That shouldn't error, I did create a new project and imported the package and could build both x86 and x86_64.
Like before; Assets/scripts/ControllerHelper.cs(7,7): error CS0246: The type or namespace name `XInputDotNetPure' could not be found. Are you missing an assembly reference?
line 7 is using XInputDotNetPure;
Manually adding XInputDotNetPure.dll in Visual studio removed the build errors from Visual Studio but Unity doesn't allow me to start. After restarting Unity the manually added assembly is removed in the visual studio build.
Perhaps noteworthy is that I'm running Visual Studio Professional 2013, which seems to have some issues with Unity. Could it be that Visual studio is not fully integrated with Unity (I am, for instance, not automatically gettign the "Attach to Unity" debugger functionality, and when I add a script I need to restart visual studio) and therefore is having issues with building it?
Wait, where are you getting this error? If it's in VS, it should add the DLL correctly to the references of the created project. Unity has done that correctly for years, it worked on VS2010...
Make sure the structure like so :
XInputDotNet/Plugins/XInputDotNetPure.dll
XInputDotNet/Plugins/x86/XInputInterface.dll
XInputDotNet/Plugins/x86_64/XInputInterface.dll
That's the bare minimum required to run.
By the way, Visual Studio 2015 is free so you might as well you use that. The Visual Studio Tools for Unity are free too since last year.
Also, I reorganised the files again so make sure to delete the old ones again.
That is the structure, I'm getting the errors in both Unity and VS. Keep in mind, it works flawlessly with the release 2 releases ago.
Yeah, I'm upgrading to Unity 5.6 now and adding the community 2017 VS from the install wizard.
Yeah, I clean the old files before every import.
Give me a few minutes, I'm going to try to uninstall vs2013 and install the newer.
You don't need to uninstall any old version of VS, it's not like Unity. 2 releases ago didn't work either, it was giving a different error.
Huh? I'm uninstalling to keep my PC somewhat clean, or are you telling me if I run the Visual Studio 2017 Community wizard it will actually upgrade my previous installation? Because that'd be magical.
No I mean, uninstalling VS can take some time, and it doesn't hurt to keep old versions around. I've had all versions since 2010 once, it all worked fine. It doesn't upgrade it, it just installs the new version.
Haha, the uninstall failed anyway - didn't expect any less. :heart: Guess I'm keeping it.
Also, are you using the 32 bits or 64 bits version of the Unity editor?
64
Okay, I just tried again with the same package and I see no issues with a new project. Can you try that? Create a new project, import the package, open the XInputTest.unity scene and run it.
Seems to have been an issue with the unity version. After upgrading it works nicely.
Ha nice! They did fix a bug related to this recently.
Thanks for your patience :blush:, now to fix all the .5 -> .6 project upgrade errors :weary:
EDIT: There were no errors! Only my missclicks, wohoo!
Thanks for all the help!
Good luck ;)
I've been using the previous release until I had some issues with build, which you took care of and created a new release. I removed the previous release Plugin and imported the new release as I did before which gave me broken references which I couldn't seem to fix.
The latests release has a different folder structure and different filenames on the dlls. The instructions saying
cannot be applied to latest release since 1) The folder structure is now Assets\XInputDotNet\Plugins\etc... 2) The filenames are XInputInterfaceX86.dll and X64 for 64.
I tried many things, such as resetting the structure to previous, but couldn't get the references to work. I downloaded the previous release and imported it, which is working like before. (I've never done the Special instructions for Free version of Unity though)