I have recently developed network module in Unity and realised that there are no direct ways to access Gameobject in main thread from other thread.
My network module operates on other thread and it should call GameObject to update some data when receive packet from a game server. However, I encountered that Some funtions of Unity like Instantaite are not accessed in other thread. It meant that it must be accessed in Unity main thread.
In order to solve such problems, I decided to develop loop which check constantly received data and pop it in other class between Gameobject and network module so that gameobject access.
I am not sure this way is proper.
I need advices to develop more efficient ways to deal with the problem.
Please give me advices if you have good ways~!
Thank you.