void Callback(IAsyncResult ar) { try { task.EndInvoke(ar); } catch (Exception e) { UnityEngine.Debug.LogException(e); } try { if (onAnyThreadTrigger != null) { onAnyThreadTrigger(); } } catch (Exception e) { UnityEngine.Debug.LogException(e); } try { if (this.onUnityThreadTrigger != null) { while (!UpdateSystem.AddUnityThreadCallbackToQueue(this)) { ; } } } catch (Exception e) { UnityEngine.Debug.LogException(e); } }
public EiCallUnityThread(Action method) { this.method = method; while (!UpdateSystem.AddUnityThreadCallbackToQueue(this)) { } }
void Callback(IAsyncResult ar) { secondThread.EndInvoke(ar); while (!UpdateSystem.AddUnityThreadCallbackToQueue(this)) { ; } }