A game about forced loneliness, made by TACStudios
1using System;
2
3using UnityEngine;
4
5using Codice.Client.Common;
6using PlasticGui;
7using Unity.PlasticSCM.Editor.UI;
8
9namespace Unity.PlasticSCM.Editor
10{
11 internal static class BuildGetEventExtraInfoFunction
12 {
13 internal static Func<string> ForPingEvent()
14 {
15 return () =>
16 {
17 PlasticGuiConfigData plasticGuiConfigData = PlasticGuiConfig.Get().Configuration;
18
19 ClientConfigData clientConfigData = ClientConfig.Get().GetClientConfigData();
20
21 return GetScreenResolution() +
22 GetUnityEditorVersion() +
23 GetUnityPluginVersion() +
24 GetPingEventExtraInfo.GetChangelistsEnabled(plasticGuiConfigData) +
25 GetPingEventExtraInfo.GetSwitchBehaviorWithChangedItems(clientConfigData);
26 };
27 }
28
29 static string GetScreenResolution()
30 {
31 string resolution = null;
32
33 GUIActionRunner.RunGUIAction(delegate
34 {
35 resolution = ScreenResolution.Get();
36 });
37
38 if (resolution == null)
39 return string.Empty;
40
41 return string.Format(":screenresolution={0}", resolution);
42 }
43
44 static string GetUnityEditorVersion()
45 {
46 string unityEditorVersion = Application.unityVersion;
47
48 if (string.IsNullOrEmpty(unityEditorVersion))
49 return string.Empty;
50
51 return string.Format(":unityEditorVersion={0}",
52 unityEditorVersion);
53 }
54
55 static string GetUnityPluginVersion()
56 {
57 string unityPluginVersion = UVCPackageVersion.Value;
58
59 if (string.IsNullOrEmpty(unityPluginVersion))
60 return string.Empty;
61
62 return string.Format(":unityPluginVersion={0}",
63 unityPluginVersion);
64 }
65 }
66}