Good afternoon everyone, I was told this section of the forums is beginner friendly. Any help would be appreciated! 
What I’m trying to do: Import my Arduino outputs Roll,Pitch,Yaw into my Unity C# script using serial namespace
Unity Version: 2020
Error: I am using the namespace: “using Serial.IO.ports;” and C# would not accept my code.
"“Assets/NewBehaviourScript.cs(5,17): error CS0234: The type or namespace name Ports' does not exist in the namespace System.IO’. Are you missing an assembly reference?”
My Code:
-----------------------------------------------------------------------
```
__Using UnityEngine;
Using System.Collections;
Using System.IO.Ports
public class Controller : Monobehaviour
{
SerialPort = data_stream = new SerialPort(“COM7” , 19200);
Public string receivedstring;
public string datas;
void Start()
{
data _stream.Open();
}
void Update()
{
recievedstring = data_stream.ReadLine();
}
}__
```
--------------------------------- End of Code
I have tried doing: edit>project settings > player > api compatability > Net Standard 2.0 to .4x but it still would not work. I believe the code is correct but I have to change a setting or something. Any typos are cause google docs btw. Any help is appreciated. My main goal is just to get rid of the errors.
There’s a lot of formatting and errors in the above code. For one, public and using would only ever be used lowercase. Another is that you have extra equal signs between the type and variable name.
Can you review the correct way to post code? It might just be damaged by how you mis-posted it above.
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
Wrapped it in code tags, now It it much clearer thank you. And yes I had to type the code in google docs manually due to me being away from our school unity computers. The actual code on my unity has proper formatting, my apologies.
I will await the posting of actual code. No sense commenting on retyped code.
```
__using UnityEngine;
using System.Collections;
using System.IO.Ports;
public class Controller : Monobehaviour
{
SerialPort = data_stream = new SerialPort(“COM9” , 19200);
public string receivedstring;
public string datas;
void Start()
{
data _stream.Open();
}
void Update()
{
recievedstring = data_stream.ReadLine();
}
}__
```
Above is the code on my Unity if it helps.
Can you remove all the underlines? That is making it very difficult to read, especially when you also have variables that have _ in the names.
Well if it is, it sure ain’t compiling like that!! Missing semicolons, extra spaces, extra equal signs, recieved vs received, etc…
I’m not wasting my time on it. Post code. This isn’t text messaging 2 c u to l8r, it’s software.