Skip to content

Commit 3a8ed10

Browse files
committed
chore(Analytics): Updated User-Agent format
1 parent 5b628bc commit 3a8ed10

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Scripts/Connection/RESTConnector.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,17 @@ private void AddHeaders(Dictionary<string, string> headers)
375375
}
376376
}
377377

378+
string osInfo = SystemInfo.operatingSystem;
379+
int osIndex = osInfo.IndexOf(" ");
380+
string os = osInfo.Substring(0, osIndex).Replace(" ", "");
381+
string osVersion = osInfo.Substring(osIndex).Replace(" ", "");
378382
headers.Add("User-Agent",
379383
string.Format(
380-
"{0} {1} {2}",
384+
"{0} {1} {2} {3}",
381385
Constants.String.Version,
382-
SystemInfo.operatingSystem, Application.version
386+
os,
387+
osVersion,
388+
Application.unityVersion
383389
));
384390
}
385391

Scripts/Utilities/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static class Path
4747
public static class String
4848
{
4949
/// <exclude />
50-
public const string Version = "watson-apis-unity-sdk/2.13.2";
50+
public const string Version = "watson-apis-unity-sdk-2.13.2";
5151
/// <exclude />
5252
public const string DebugDispalyQuality = "Quality: {0}";
5353
/// <summary>

0 commit comments

Comments
 (0)