Quantcast
Channel: Latest Questions by Flynn
Viewing all articles
Browse latest Browse all 48

When best to end a thread?

$
0
0
Hello! :) My code (C#) starts a thread that pings a server every 7 seconds. However, when Unity stops playing... The thread lives on! As I am typing this, Unity is still pinging my server, even though it is not in play mode. Is there any callback I can set, etc, that will be called when Unity is closed so that I can close the thread? My code is NOT a mono-behaviour, and as such, the typical methods such as Update() or Start() are not available.

Viewing all articles
Browse latest Browse all 48

Trending Articles



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