0

Just asking if i have to make a main loop within a unity script to hold all the UDP communication stuff or if I can just put it inside update. I'm only calling it once so I don't see a reason to have a separate script.

1 Answers1

0

There is no such thing as main loop. No, you can't put your UDP code in the Update function. You either have to use asynchronous UDP code or you put your synchronous UDP code in a while loop, in another Thread.

Community
  • 1
  • 1
Programmer
  • 121,791
  • 22
  • 236
  • 328