UnityMainThreadDispatcher icon indicating copy to clipboard operation
UnityMainThreadDispatcher copied to clipboard

Function is called without Enqueue

Open kiranjavvajisc opened this issue 3 years ago • 0 comments

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

kiranjavvajisc avatar Feb 02 '22 14:02 kiranjavvajisc