Serial Connection Won't Open

Hello,

I am currently working on a project to interface Arduino with Unity but I am having a bit of trouble with my serial connection. My Arduino (Leonardo) will no write serial data through the connection all the time. For some reason it will only write it when I open the serial monitor. I am not sure if this is normal behavior or not and if it is, is there a way to open it and keep it open? I can tell it is not writing because the TX light will remain off until I open the monitor. This becomes a problem when I try to use Unity to read from the serial port because there will be no data on it until I open the serial monitor, then Unity has complete access to the data. Any help would be appreciated, thanks guys.

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  
  Serial.write("I'm Alive");
  Serial.println();

  delay(20);
}

What do you mean by "Unity"?

The documentation suggests you need special treatment for Serial on the Leonardo.

...R

The documentation suggests you need special treatment for Serial on the Leonardo.

In addition, the sending end must set Dtr_Enable to true when the serial port is enabled. Failure to do that, which is quite common, means that the software can't talk to the Leonardo. Opening the Serial Monitor sets Dtr_Enable to true, so any application that tries to talk to the Leonardo can.