private void RefreshSupportedUnityVersions(IPackageVersion version) { var supportedVersion = version.supportedVersions?.Any() == true?version.supportedVersions.First() : version.supportedVersion; var hasSupportedVersions = supportedVersion != null; if (hasSupportedVersions) { detailUnityVersions.SetValueWithoutNotify(string.Format(L10n.Tr("{0} or higher"), supportedVersion)); var tooltip = supportedVersion.ToString(); if (version.supportedVersions?.Any() == true) { var versions = version.supportedVersions.Select(version => version.ToString()).ToArray(); tooltip = versions.Length == 1 ? versions[0] : string.Format(L10n.Tr("{0} and {1} to improve compatibility with the range of these versions of Unity"), string.Join(", ", versions, 0, versions.Length - 1), versions[versions.Length - 1]); } detailUnityVersions.tooltip = string.Format(L10n.Tr("Package has been submitted using Unity {0}"), tooltip); } UIUtils.SetElementDisplay(detailUnityVersionsContainer, hasSupportedVersions); }