How to transfer an TCPClient trough a different scene?

I am trying to transfer, my TCPClient (client socket connection) from a login scene to a play scene. I dont want to close and reopen it again. What would be the best approch?

You can make it a static variable, for C#:

public class MyClass : MonoBehaviour
public static TCPClient *MyClient;

That way it doesn’t get destroyed with the object. Or you can use this:

Or some other variations/combinations of the above.