I'm doing a project in Unity 3D that using serial ports , I had problems with the serial port inside Unity. I have a idea but i don't know it will work.
I intend to build a dll in c# that is used for unity, this dll file is the serial port driver and lets to Unity get and send data to serial port through a class c# in Unity .
The doubt is: There's a event in c# called "SerialDataReceivedEventHandler" (Represents the method that will handle the DataReceived event of a SerialPort object) but it seems this event is not raised automatically when the dll file is used.
How can I invoke this method automatically inside the dll ???
Other alternative is to write a dll file in c++ using win32 API , will this be more useful as soon as port communication???
Thanks.