Skip to content

Commit 4cf7c4f

Browse files
committed
fix: PlatformManager Internals
Setting `PlatformManager.PlatformInfo` and `PlatformInformation` to be `internal`, such that other code can reference it and add to it.
1 parent 8c31f24 commit 4cf7c4f

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.
@@ -405,7 +405,12 @@ public static string GetConfigFileName(Platform platform)
405405
/// <returns>Full name of platform.</returns>
406406
public static string GetFullName(Platform platform)
407407
{
408-
return PlatformInformation[platform].FullName;
408+
if (PlatformInformation.TryGetValue(platform, out PlatformInfo value))
409+
{
410+
return value.FullName;
411+
}
412+
413+
return platform.ToString();
409414
}
410415
}
411416
}

0 commit comments

Comments
 (0)