Keeping an IRC chat box persistent across scenes

I am still relatively new to Unity so I am not sure of a suitable solution.

I am making a turn based battle game that utilizes a Twitch chat room which will allow viewers to “control” the enemy that the player faces by entering commands into the chat. Prior to playing, the player will first have to connect to their personal Twitch channel’s chatroom, done in a “connectChat” scene.

This scene has a chatBox gameObject which contains two scripts: one that creates a TCP connection to the Twitch IRC server, and reads incoming messages as well as writing to the IRC when needed. The other script is used to add Text objects as children to the chatBox to display chat messages in-game.

Once a connection has been successful, I will want to use this chatBox (or at least the created TCP connection) in the main scene where the gameplay will take place. That is where I am having some difficulty coming with a solid solution. I was looking into the singleton approach however it seems that is frowned upon.

Any suggestions or any questions? Again, the goal is to use a chatBox gameObject with a TCP connection from one scene and use it in another. Depending on my future design, I may not add the chatBox to the main scene but will still want to keep the TCP connection. Thanks!

Singletons may sometimes be frowned upon when they’re abused, I suppose (much like anything). They can be great assets, though. That’s probably what I’d do in that situation. And keep the game object around with ‘DontDestroyOnLoad’.