I am making a game for school and it is going to be displayed on a raspberry pi. My teacher has asked me to build a controller for it. I was wondering if it is possible to add a reference to Windows.Devices.Gpio in unity to be able to access that? I have found very little about this online, maybe someone has knowledge that they could share.
Thanks
Yes, Windows.Devices.Gpio is able to used in unity app running on a raspberry pi.
Firstly,you need to publish the unity project to Universal Windows Platform, Unity 2017 will export Visual Studio 2017 solution which then build and run on Windows 10 PCs plus Windows 10 phones and tablets.Three architectures are supported: ARM, x86 and x64. In addition, you can use .NET Core 5.0 in your game projects.
And then you should add the reference Windows IoT Extension for UWP to the solution.After that,you can use Windows.Devices.Gpio in your code, please see this sample.