- Home /
Help!! Unable to access the transform of my avatar (getting data real time TCP client/server)
Hi! So I've been doing this motion capture of an humanoid avatar project for the past few months. I'm getting motion data from a client. I made TCP server/listener on the side of Unity to read all the data. It reads perfectly. I have used a thread for this. Unfortunately I can't seem to access the transform of my avatar body part to change its transform rotation for example with the new data.
"get_transform 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."
Do you guys know how to fix this? Any comments would be appreciated!
Your answer
![](https://koobas.hobune.stream/wayback/20220612072439im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why avatar with NetworkIdentity will be disabled when change scene? 0 Answers
Can't access "NetworkServer" 0 Answers
Why I cant use 2 NetworkManagers in the same time? 0 Answers
Failure generating network code 1 Answer
Custom Network Manager 0 Answers