private void Update() { int idx = QualitySettings.GetQualityLevel(); if (idx != lastQualityIdx) { InsightsKit.ReportUnityQuality(); lastQualityIdx = idx; } }
internal static void ReportUnityQuality() { var names = QualitySettings.names; var level = QualitySettings.GetQualityLevel(); if (names == null || names.Length == 0) { InsightsKit.ReportQualityLevelChanged(100, "no name"); return; } if (names.Length == 1) { InsightsKit.ReportQualityLevelChanged(100, names[0]); return; } var normLevel = (float)level / Mathf.Max(1f, (float)names.Length - 1.0f); var quality = normLevel * 99.0f + 1.0f; InsightsKit.ReportQualityLevelChanged( Mathf.RoundToInt(quality), names[level] ); }
private static void OnSceneChanged(UnityEngine.SceneManagement.Scene current, UnityEngine.SceneManagement.Scene next) { InsightsKit.ReportSceneChanged(next); }