// Token: 0x06005176 RID: 20854 RVA: 0x001BE714 File Offset: 0x001BCB14 private void UpdateFPS() { HMDManager._TimeLeft -= Time.deltaTime; HMDManager._Accum += Time.timeScale / Time.deltaTime; HMDManager._Frames++; if ((double)HMDManager._TimeLeft <= 0.0) { float num = HMDManager._Accum / (float)HMDManager._Frames; HMDManager._strFPS = string.Format("FPS: {0:F2}", num); HMDManager._TimeLeft += HMDManager._UpdateInterval; HMDManager._Accum = 0f; HMDManager._Frames = 0; if (num < 35f) { if (!this.isAtVeryLowFramerate) { this.isAtVeryLowFramerate = true; this.veryLowFramerateTimeStarted = Time.unscaledTime; } } else { this.isAtVeryLowFramerate = false; } if (this.isAtVeryLowFramerate && Time.unscaledTime - this.veryLowFramerateTimeStarted > 3f) { VRCLog.UploadMiniLog("Prolonged framerate less than " + 35f + " FPS!"); } } }
// Token: 0x06005776 RID: 22390 RVA: 0x001E1E6C File Offset: 0x001E026C private void AttachAvatar(UnityEngine.Object Prefab, string Name, float Scale = 1f, Action onSuccess = null, Action onError = null) { if (Prefab == null) { return; } if (!this.CanAttachAvatars()) { Debug.Log("Deferring avatar load: " + Name + " from object " + base.name); base.StartCoroutine(this.DeferWhile(() => !this.CanAttachAvatars(), delegate { this.AttachAvatar(Prefab, Name, Scale, onSuccess, onError); })); return; } if (Prefab == this.errorAvatarPrefab) { VRCLog.UploadMiniLog("Failed to load avatar!"); } try { this.AttachAvatarInternal(Prefab, Name, Scale); if (onSuccess != null) { onSuccess(); } } catch (Exception ex) { Debug.LogException(ex, base.gameObject); Analytics.Send(ApiAnalyticEvent.EventType.error, "Avatar Loading Exception: " + Name + " - " + ex.ToString(), null, null); if (onError != null) { onError(); } } }