Example #1
0
    void OnDestroy()
    {
        // All jobs must be completed before we can dispose the data they use
        jobHandler.Complete();
        m_ClientDriver.Disconnect(m_clientToServerConnection[0]);
        m_ClientDriver.Dispose();
        m_clientToServerConnection.Dispose();

        pcc.GetStateEvent   -= GetStateEventCallback;
        pcc.GetResultsEvent -= GetResultsEventCallback;
    }
Example #2
0
 void LateUpdate()
 {
     // On fast clients we can get more than 4 frames per fixed update, this call prevents warnings about TempJob
     // allocation longer than 4 frames in those cases
     jobHandler.Complete();
 }