Is there more efficient ways to access GameObject in main thread in Unity from other thread?

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.

You can save data to local property by event or callback, and then use it in Update().

Some snippet code like this:

// My own wrapped socket class
private SocketClient _tcpClient = new SocketClient();
// Received data will be saved in this list
private ArrayList dataList = new ArrayList();

// init event callback
void Start ()
{
	_tcpClient.ConnectionStatusChanged += ConnectChanged;		
	_tcpClient.FrameDataReceived += FrameDataReceived;
}

// Update is called once per frame
void Update ()
{
	if(dataList.Count>0)
	{
		transform.Translate((Vect3D)dataList[0]);
		dataList.RemoveAt(0);
	}
}

private void FrameDataReceived(float posX, float posY, float posZ)
{
	dataList.Add(new Vect3D(posX, posY, posZ));
}

Good luck!