public void Debugger() { if (cam == null) { cam = FindObjectOfType <ServerCamera>(); } if (cam == null) { return; } cam.Refresh(); }
IEnumerator DestroyPlayer(string accountID) { yield return(new WaitForSeconds(0.2f)); GameObject userObj = GameObject.Find(accountID); if (userObj != null) { DestroyImmediate(userObj); ServerCamera cam = FindObjectOfType <ServerCamera>(); if (cam != null) { cam.Refresh(); } Debug.LogWarning("User object is manually destroyed"); } }