@@ -56,9 +56,10 @@ public enum Platform
5656 PS4 = 0x80 ,
5757 PS5 = 0x100 ,
5858 Switch = 0x200 ,
59+ Switch2 = 0x300 ,
5960 Steam = 0x400 ,
60- Console = PS4 | PS5 | XboxOne | XboxSeriesX | Switch ,
61- Any = Unknown | Windows | Android | XboxOne | XboxSeriesX | iOS | Linux | macOS | PS4 | PS5 | Switch | Steam
61+ Console = PS4 | PS5 | XboxOne | XboxSeriesX | Switch | Switch2 ,
62+ Any = Unknown | Windows | Android | XboxOne | XboxSeriesX | iOS | Linux | macOS | PS4 | PS5 | Switch | Switch2 | Steam
6263 }
6364
6465 internal readonly struct PlatformInfo
@@ -89,7 +90,7 @@ public static PlatformInfo Create<T>(string fullName, string configFileName, str
8990 }
9091
9192 /// <summary>
92- /// Private collection to store information about each platform.
93+ /// Internal collection to store information about each platform.
9394 /// </summary>
9495 internal static IDictionary < Platform , PlatformInfo > PlatformInformation = new Dictionary < Platform , PlatformInfo > ( ) ;
9596
@@ -281,6 +282,9 @@ public static PlatformConfig GetPlatformConfig()
281282 { RuntimePlatform . GameCoreXboxOne , Platform . XboxOne } ,
282283 { RuntimePlatform . XboxOne , Platform . XboxOne } ,
283284 { RuntimePlatform . Switch , Platform . Switch } ,
285+ #if UNITY_6000_0_61_OR_NEWER || UNITY_6000_3_0_OR_NEWER
286+ { RuntimePlatform . Switch2 , Platform . Switch2 } ,
287+ #endif
284288 { RuntimePlatform. GameCoreXboxSeries , Platform . XboxSeriesX } ,
285289 { RuntimePlatform . LinuxPlayer , Platform . Linux} ,
286290 { RuntimePlatform . LinuxEditor , Platform . Linux} ,
@@ -322,6 +326,9 @@ public static bool TryGetPlatform(RuntimePlatform runtimePlatform, out Platform
322326 { BuildTarget . PS4 , Platform . PS4 } ,
323327 { BuildTarget . PS5 , Platform . PS5 } ,
324328 { BuildTarget . Switch , Platform . Switch } ,
329+ #if UNITY_6000_0_61_OR_NEWER || UNITY_6000_3_0_OR_NEWER
330+ { BuildTarget . Switch2 , Platform . Switch2 } ,
331+ #endif
325332 { BuildTarget. StandaloneOSX , Platform . macOS } ,
326333 { BuildTarget . StandaloneWindows , Platform . Windows } ,
327334 { BuildTarget . StandaloneWindows64 , Platform . Windows } ,
0 commit comments