public static int GetCurrentLOD(this LODGroup lodGroup, Camera camera = null) { LOD[] lods = lodGroup.GetLODs(); float relativeHeight = lodGroup.GetRelativeHeight(camera ?? Camera.current); int lodIndex = GetCurrentLOD(lods, lodGroup.GetMaxLOD(), relativeHeight, camera); return(lodIndex); }