@@ -5,23 +5,58 @@ namespace StreamVideo.Libs.AppInfo
55 public class UnityApplicationInfo : IApplicationInfo
66 {
77 public string Engine => "Unity" ;
8-
8+
99 public string EngineVersion => Application . unityVersion ;
10-
10+
1111 public string Platform => Application . platform . ToString ( ) ;
12-
12+
1313 public string OperatingSystem => SystemInfo . operatingSystem ;
14- public string OperatingSystemFamily => SystemInfo . operatingSystemFamily . ToString ( ) ;
14+
15+ public string OperatingSystemFamily => GetOsFamily ( ) ;
16+
1517 public string CpuArchitecture => SystemInfo . processorType ;
1618
1719 public int MemorySize => SystemInfo . systemMemorySize ;
18-
20+
1921 public int GraphicsMemorySize => SystemInfo . graphicsMemorySize ;
2022
2123 public string ScreenSize => Screen . width + "x" + Screen . height ;
22-
24+
2325 //StreamTodo: solve this, the deviceName is just a local name so perhaps not something we want
24- public string DeviceName => SystemInfo . deviceName ;
26+ public string DeviceName => SystemInfo . deviceName ;
27+
2528 public string DeviceModel => SystemInfo . deviceModel ;
29+
30+ private static string GetOsFamily ( )
31+ {
32+ switch ( Application . platform )
33+ {
34+ case RuntimePlatform . Android :
35+ return "Android" ;
36+
37+ case RuntimePlatform . IPhonePlayer :
38+ return "iOS" ;
39+
40+ case RuntimePlatform . tvOS :
41+ return "tvOS" ;
42+
43+ case RuntimePlatform . OSXPlayer :
44+ case RuntimePlatform . OSXEditor :
45+ return "macOS" ;
46+
47+ case RuntimePlatform . WindowsPlayer :
48+ case RuntimePlatform . WindowsEditor :
49+ return "Windows" ;
50+
51+ case RuntimePlatform . LinuxPlayer :
52+ case RuntimePlatform . LinuxServer :
53+ case RuntimePlatform . LinuxEditor :
54+ return "Linux" ;
55+
56+ default :
57+ var family = SystemInfo . operatingSystemFamily ;
58+ return family != UnityEngine . OperatingSystemFamily . Other ? family . ToString ( ) : "Unknown" ;
59+ }
60+ }
2661 }
27- }
62+ }
0 commit comments