@@ -531,6 +531,7 @@ public static string GetUnityReleaseURL(string version)
531531
532532var cleanVersion = CleanVersionNumber ( version ) ;
533533string url = $ "https://unity.com/releases/editor/whats-new/{ cleanVersion } #notes";
534+
534535//if (VersionIsArchived(version) == true)
535536//{
536537// // remove f#, TODO should remove c# from china version ?
@@ -608,15 +609,17 @@ public static bool OpenReleaseNotes(string version)
608609{
609610bool result = false ;
610611if ( string . IsNullOrEmpty ( version ) ) return false ;
612+
611613string url = null ;
612614if ( Properties . Settings . Default . useAlphaReleaseNotes && HasAlphaReleaseNotes ( version ) )
613615{
614616url = GetAlphaReleaseNotesURL ( version ) ;
615617}
616618else
617619{
618- url = Tools . GetUnityReleaseURL ( version ) ;
620+ url = GetUnityReleaseURL ( version ) ;
619621}
622+
620623if ( string . IsNullOrEmpty ( url ) ) return false ;
621624
622625OpenURL ( url ) ;
@@ -847,8 +850,20 @@ public static string DownloadHTML(string url)
847850public static string CleanVersionNumber ( string version )
848851{
849852if ( string . IsNullOrEmpty ( version ) ) return null ;
850- // note old patch versions still contains p## in the end
851- return Regex . Replace ( version , @"[f|a|b][0-9]{1,2}" , "" , RegexOptions . IgnoreCase ) ;
853+
854+ var split = version . Split ( '.' ) ;
855+ float parsedVersion = float . Parse ( $ "{ split [ 0 ] } .{ split [ 1 ] } ") ;
856+ // 2023.3 and newer Alpha releases, no replace
857+ if ( IsAlpha ( version ) && parsedVersion >= 2023.3 )
858+ {
859+ // do nothing
860+ }
861+ else
862+ {
863+ // note old patch versions still contains p## in the end
864+ version = Regex . Replace ( version , @"[f|a|b][0-9]{1,2}" , "" , RegexOptions . IgnoreCase ) ;
865+ }
866+ return version ;
852867}
853868
854869private static string FetchUnityVersionNumberFromHTML ( string url )
@@ -2216,7 +2231,7 @@ internal static void OpenCustomAssetPath()
22162231}
22172232}
22182233}
2219-
2234+
22202235private static async Task < bool > DownloadFileAsync ( string fileUrl , string destinationPath )
22212236{
22222237var cancellationTokenSource = new CancellationTokenSource ( ) ;
@@ -2229,25 +2244,25 @@ private static async Task<bool> DownloadFileAsync(string fileUrl, string destina
22292244using ( var client = new HttpClient ( ) )
22302245using ( var response = await client . GetAsync ( fileUrl , HttpCompletionOption . ResponseHeadersRead , cancellationTokenSource . Token ) )
22312246{
2232- response . EnsureSuccessStatusCode ( ) ;
2247+ response . EnsureSuccessStatusCode ( ) ;
22332248
2234- var totalBytes = response . Content . Headers . ContentLength ?? 1 ;
2235- var buffer = new byte [ 8192 ] ;
2236- var totalRead = 0 ;
2249+ var totalBytes = response . Content . Headers . ContentLength ?? 1 ;
2250+ var buffer = new byte [ 8192 ] ;
2251+ var totalRead = 0 ;
22372252
2238- using ( var contentStream = await response . Content . ReadAsStreamAsync ( ) )
2239- using ( var fileStream = new FileStream ( destinationPath , FileMode . Create , FileAccess . Write ,
2240- FileShare . None , buffer . Length , true ) )
2253+ using ( var contentStream = await response . Content . ReadAsStreamAsync ( ) )
2254+ using ( var fileStream = new FileStream ( destinationPath , FileMode . Create , FileAccess . Write ,
2255+ FileShare . None , buffer . Length , true ) )
2256+ {
2257+ int bytesRead ;
2258+ while ( ( bytesRead = await contentStream . ReadAsync ( buffer , 0 , buffer . Length , cancellationTokenSource . Token ) ) > 0 )
22412259{
2242- int bytesRead ;
2243- while ( ( bytesRead = await contentStream . ReadAsync ( buffer , 0 , buffer . Length , cancellationTokenSource . Token ) ) > 0 )
2244- {
2245- await fileStream . WriteAsync ( buffer , 0 , bytesRead , cancellationTokenSource . Token ) ;
2246- totalRead += bytesRead ;
2247- progressWindow . UpdateProgress ( new DownloadProgress ( totalRead , totalBytes ) ) ;
2248- }
2249- result = true ;
2260+ await fileStream . WriteAsync ( buffer , 0 , bytesRead , cancellationTokenSource . Token ) ;
2261+ totalRead += bytesRead ;
2262+ progressWindow . UpdateProgress ( new DownloadProgress ( totalRead , totalBytes ) ) ;
22502263}
2264+ result = true ;
2265+ }
22512266}
22522267}
22532268catch ( TaskCanceledException )