I have this game client which connects to the server and sends requests and getting responses.
I have created a separate thread for listening to the server. Based on the response from the server, I want make GameObjects.
But the problem is, the server response is taken into my game using a separate thread. And as far as I know, we cannot create game objects in unity in any other thread than Main Thread.
How to create game objects based on the server response?
I am new to c# and unity. Sorry if this is a silly question. I did some research on the topic and I couldn't find and answer. There were posts saying to use coroutines; but I can't quite understand them.