Skip to content

Commit cd26d7f

Browse files
authored
Merge pull request #1086 from PlayEveryWare/fix/platformmanager-internals
fix: PlatformManager Internals
2 parents f040bd2 + 4cf7c4f commit cd26d7f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

com.playeveryware.eos/Runtime/Core/PlatformManager.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public enum Platform
6161
Any = Unknown | Windows | Android | XboxOne | XboxSeriesX | iOS | Linux | macOS | PS4 | PS5 | Switch | Steam
6262
}
6363

64-
private readonly struct PlatformInfo
64+
internal readonly struct PlatformInfo
6565
{
6666
public string FullName { get; }
6767
public string ConfigFileName { get; }
@@ -91,7 +91,7 @@ public static PlatformInfo Create<T>(string fullName, string configFileName, str
9191
/// <summary>
9292
/// Private collection to store information about each platform.
9393
/// </summary>
94-
private static IDictionary<Platform, PlatformInfo> PlatformInformation = new Dictionary<Platform, PlatformInfo>();
94+
internal static IDictionary<Platform, PlatformInfo> PlatformInformation = new Dictionary<Platform, PlatformInfo>();
9595

9696
/// <summary>
9797
/// Backing value for the CurrentPlatform property.
@@ -406,7 +406,12 @@ public static string GetConfigFileName(Platform platform)
406406
/// <returns>Full name of platform.</returns>
407407
public static string GetFullName(Platform platform)
408408
{
409-
return PlatformInformation[platform].FullName;
409+
if (PlatformInformation.TryGetValue(platform, out PlatformInfo value))
410+
{
411+
return value.FullName;
412+
}
413+
414+
return platform.ToString();
410415
}
411416
}
412417
}

0 commit comments

Comments
 (0)