- Home /
How to give support for Samsung S-Pen?
In my Galaxy Note, the s-pen is not working. One of Unity´s 3.5 changes is:
"Added support for Galaxy Note Stylus Pen (through KeyCode.LeftControl and KeyCode.Delete)."
I´m running 3.5.6f4. I can´t get it to work, i´ve tried both Input.touches and Input.GetMouseButtonDown to no avail. Only UnityGUI seems to be responding to the stylus.
I suppose the KeyCodes mentioned in the changelog are the keys that are on the stylus, not the actual stylus. Has anyone managed to get this working?
Answer by Graham-Dunnett · Nov 21, 2012 at 11:24 AM
I think Samsung got this to work, see http://developer.samsung.com/s-pen-sdk/unity-extension.
I think that sdk provides a way to access s-pen specific functionality like pressure detection, pen buttons, canvas drawing, etc.
However basic touch detection should work...and as of 3.5, pen buttons too.
I managed to get it working using Event.current (mouse position, up/down/drag events...). Even hover works correctly with the s-pen. This must be an Unity bug, because GUI events do work with the pen, whereas the Input class does not.
@arkano22: do you have it working on Jellybean? AFAI$$anonymous$$ the spen sdk v 2.2 breaks the GUI events.
Can you please tell me how to add spen to my unity project.I'm struck.