Microsoft Surface Pen working in editor, but not build

Hey folks,

I’m currently building something for the Surface Pro 4 that requires pen input.

In the editor, the pen acts as a mouse, and input works through Input.GetMouseButton(0). In the PC build however, the pen doesn’t seem to be supported at all. UI elements don’t respond to pen taps like they do in the editor, nor do raycasts from mouse position.

Does anyone know how I can get the Surface to register pen input?


For those in the future looking for the answer → It only works if you build a UWP app, not a desktop one. It’s not ideal, but if pen is important, that seems to be the only way

Have you sovled this problem?