UnityMainThreadDispatcher
UnityMainThreadDispatcher copied to clipboard
Function is called without Enqueue
private void OnDisconnected()
{
LogUtils.log("OnDisconnected");
UnityMainThreadDispatcher.Instance().Enqueue(() =>
{
InternetChecker.instance.InternetIsNotAvailable();
});
}
I have the above code, but in the logs "OnDisconnected" log is not seen. But the function "InternetIsNotAvailable" is called every frame in Update. Is there anything that I am missing in the usage of UnityMainThreadDispatcher