Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Why does this threading code throw an error in the editor, but not a build?

$
0
0
I'm using the Threading example in the ["Unity Network Code and You" example project][1] put together by Unity for a Unite 12 talk. - If I build the server and client it works fine. - If I build the server and use the editor as a client, it works fine. - BUT if I build the client, and get the editor to run as a server (changing "isServer" to true in Control.cs), I get this error when I run the client app. **get_gameObject can only be called from the main thread. (Control.cs:147)** I understand the error in principle, but I can't figure out why I only get it when the server is running in the editor. I'm on OSX. [1]: https://github.com/AngryAnt/Unity--Network-Code-and-You

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>