Quantcast
Channel: Answers by "Mike 3"
Viewing all articles
Browse latest Browse all 60

Answer by Mike 3

$
0
0
There isn't any built in synchronization between user threads and the unity thread. The main issue is a more to do with timing of events rather than the usual synchronization of data issue. The way I've solved it in the past is to make a synchronization class which takes a delegate and some user data, and places both into a list. That list is then iterated over in Update, with all the delegates being called, with the user data being passed as parameter. The calling from update part is what makes it work at any rate, since unity expects you to only call into the unity api from its own events

Viewing all articles
Browse latest Browse all 60

Latest Images

Trending Articles



Latest Images

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