- Home /
Unity Editor crashing on SerialPort.Open()?
Hi folks,
can anybody confirm that the Unity Editor crashes on System.IO.Ports.SerialPort.Open()? Or is it only me?
Cheers, Hendrik
Answer by programmrzinc · Apr 19, 2012 at 12:37 PM
It might not find the port you specified, or maybe its just a glitch
Answer by mark.gossage · Aug 31, 2012 at 09:35 AM
Not true, but serial port code does crash out the editor. Tested using Unity 3.5.3 on Windows 7 (x86)
SerialPort.Open() ok SerialPort.ReadLine() always times out SerialPort.ReadChar() works SerialPort.BytesToRead() crashes the editor I have managed to hang the editor quite a lot.
Answer by JanZimmermann · Apr 04, 2013 at 08:32 AM
Same here in Unity 4.1.2 but ReadLine works.
I have managed to get it working with a new Thread and a endless Loop
aka
string x;
while(true)
{
x = _port.ReadLine();
MakeSomewhat(x);
}
Your answer
Follow this Question
Related Questions
Using the SerialPort class in Unity 3.1 Free 2 Answers
How to Save an multidimensional array trough editor script 1 Answer
Fastest way to instantiate and move multiple game objects in the editor 3 Answers
very long LAG in my unity game using arduino 2 Answers
Custom icons for files on Project Window 0 Answers