My Unity won't read a String Data from arduino

Unity Code

using System.Collections;
using System.Collections.Generics;
using UnityEngine;
using System.IO.Ports;
using System.Threadings;

public class sample: MonoBehavior
{
SerialPort sp = new SerialPort("COM3", 9600)
public GameObject Image;

void Start()
{
sp.close();
sp.Open();
sp.ReadTimeout = 1;
}

void Update()
{
if(sp.IsOpen)
{
try
{
ArduinoString(sp.ReadLine());
print(ArduinoString);
}
catch(System.Exception)
{
}
}

void ArduinoString(string txt)
{
if(txt == "r")
{
Image.setActive(true);
}

Arduino Code

void setup()
{
Serial.begin(9600);
Serial.write("r");
Serial.flush();
}
void loop()
{

}

I don't know anything about unity. Having said that

Opening the serial port results in a reset of most Arduinos; so you might have to wait a bit.

Using a try/catch without doing something in the catch makes you blind, you will have no idea if there was an exception or not.

What is the unit if ReadTimeout? Milliseconds? Seconds?

I have used the C# library in unity. it's simple and works well.