void onDestroy() { if (!isServer && hasAuthority) { IAAPlayer.removeAuthority(netId); } }
// This is a kludge. I have to relinquish the Reticle back to the server so it doesn't get // destroyed when I go away. void OnApplicationQuit() { if (!isServer && hasAuthority) { IAAPlayer.removeAuthority(netId); } }
IEnumerator handleUpload() { DownloadHandlerBuffer handler = new DownloadHandlerBuffer(); yield return(StartCoroutine(Webserver.singleton.Upload(m_mostRecentFilename, m_mostRecentClip, handler))); yield return(new WaitUntil(() => handler.isDone == true)); if (!hasAuthority) { IAAPlayer.getAuthority(netId); } yield return(new WaitUntil(() => hasAuthority == true)); spawnTheWord(); IAAPlayer.removeAuthority(netId); }