Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Assets/Countly/Plugins/CountlySDK/Helpers/MetricHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ public string Locale
}
}

public string UnityVersion
{
get {
if (overridenMetrics != null && overridenMetrics.ContainsKey("_unity_version")) {
return overridenMetrics["_unity_version"];
}
return Application.unityVersion.ToString();
}
}

/// <summary>
/// Generates a JSON representation of device and application metrics, combining default and overridden metrics.
/// </summary>
Expand All @@ -105,7 +115,8 @@ public string buildMetricJSON()
{ "_resolution", Resolution},
{ "_app_version", AppVersion},
{ "_density", Density},
{ "_locale", Locale}
{ "_locale", Locale},
{ "_unity_version", UnityVersion}
};

if (overridenMetrics != null) {
Expand Down