Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

InstantiateSingle can only be called from the main thread

$
0
0
I'm beginner in scripting in Unity 3d.

I'm trying to call a function inside a C-sharp script from a Javascript. The javascript is intended to manage the incoming OSC messages.

As shown in the attached example, it works from pushing space button because it is in the main thread but it does not work when it's called from the function dealing with the oscmessages (when sending "/1 bla" in o/c to unity).

Already tried to workaround it by calling a flag inside the update function of the C-sharp...

InstantiateSingle can only be called from the main thread

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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