S7 connection - get_gameObject can only be called from the main thread.
Hi,
When trying to make an S7 connection (new empty scene) in the realvirtual.IO starter kit I have following issue.
The connection is OK and running in Scene mode, but once in Game mode, I see I have following error:
Connection failed: get_gameObject can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
In the connection view of TIA portal I see a lot of connection active.
Does anyone has any advise on how to solve this?
Unity version

siemens CPU 1515-2-PN



Connection failed: get_gameObject can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.

Customer support service by UserEcho
Please try changin in line 779 this:
if (connectionstatus == 0)
{
int ExecTime = Client.ExecTime();
// Use ThreadStatus for thread-safe logging (no Unity object access from background thread)
ThreadStatus = "S7 interface connected - time: " + ExecTime.ToString() + " ms";
Much better!
Never would have find this.
Thank you for your quick answer.