I’m trying to build a game in Unity which runs on a Raspberry Pi 3 with Windows 10 IoT core, and I want to be able to access the GPIO pins from my Unity game so I can light an LED when the player wins. I’m trying to access Windows.Devices.Gpio from within Unity, but I am receiving an error that it cannot find the Windows namespace.
I have my build platform set to UWP, and have IoT selected under Publishing Settings → Supported Device Families, which, according to Unity Docs should allow for Windows IoT Extension SDK API contracts for UWP.
When I then try adding ‘using Windows.Devices.Gpio’ to my script, I’m getting a Windows namespace cannot be found error in Unity.
In the Visual Studio solution generated by Unity, it’s saying the Windows namespace is available in Assembly-CSharp.Player but not in Assembly-CSharp (where my Unity scripts are located)
How can I access the GPIO pins from within Unity?