Unity to Arduino Communication. COM port

When trying to communicate from Unity to an Arduino is there a way to make it so that the Arduino always has the same COM port or is there a way to have the Arduino tell Unity what COM port it’s using?

In my experience if you plug the same arduino to the same USB, it always has the same COM port. Otherwise you can try all ports and see which one is available.

	public bool Connect () 
	{
		serialPort.ReadTimeout = 1;
		serialPort.WriteTimeout = 1;
		if(debug)
			Debug.Log("Start connecting Serial Device");

		bool connect=false;
		//find the COM and connect
		
        foreach (string s in SerialPort.GetPortNames())
        {
			connect= Open(s);
			if (connect)
			{
				if(debug)
					Debug.Log("First Connected COM device on Port: "+s);
				break;
			}
		}	
		if(!connect)
			Debug.LogWarning("All available COM ports tried");
		return connect;
	}