Skip to content

Commit

Permalink
Updated to v7.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin-ga committed Oct 10, 2023
1 parent c354a2d commit 220793a
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
---------
<!--(CHANGELOG_TOP)-->
**7.7.1**
* fixed a bug in the android user-id generation

**7.7.0**
* updated impression listeners for AdMob 8.0.0 (please check out the migration guide: https://developers.google.com/admob/unity/migration)
* added functionality to opt out of GAID & IDFV tracking
Expand Down
126 changes: 126 additions & 0 deletions Editor/GA_SettingsInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ public class GA_SettingsInspector : UnityEditor.Editor
private GUIContent _infoLogBuild = new GUIContent("Info Log Build", "Show info messages from GA in builds (f.x. Xcode for iOS).");
private GUIContent _verboseLogBuild = new GUIContent("Verbose Log Build", "Show full info messages from GA in builds (f.x. Xcode for iOS). Noet that this option includes long JSON messages sent to the server.");
private GUIContent _useManualSessionHandling = new GUIContent("Use manual session handling", "Manually choose when to end and start a new session. Note initializing of the SDK will automatically start the first session.");

private GUIContent _enableSDKInitEvent = new GUIContent("Enable Startup Metrics", "Enables automatic startup performance data collection. This includes: application's boot time, general device specs (such as cpu model, number of cores, total memory, device resolution) and if this was the first time the user booted this application.");
private GUIContent _enableHealthEvent = new GUIContent("Enable Session Performance Metrics", "Enables automatic performance data collection across the whole session. This includes sampling fps, memory consumption & cpu usage without any noticeable performance impact.");

private GUIContent _enableAppBootTracking = new GUIContent("Boot time", "Will collect data on application start-up time (from launch until GameAnalytics has been initialized)");
private GUIContent _enableMemoryTracking = new GUIContent("Memory Snapshots", "Performance & error events will take memory usage snapshots");
private GUIContent _enableHardwareTracking = new GUIContent("Hardware Info", "Data about the user's hardware info and usage will be collected");
private GUIContent _enableFPSHistogram = new GUIContent("FPS Histogram", "Samples FPS across the whole session and compiles a histogram");
private GUIContent _enableMemoryHistogram = new GUIContent("Memory Usage Histogram", "Samples memory usage across the whole session & compiles a histogram");

#if UNITY_5_6_OR_NEWER
private GUIContent _usePlayerSettingsBunldeVersionForBuild = new GUIContent("Send Version* (Android, iOS) as build number", "The SDK will automatically fetch the version* number on Android and iOS and send it as the GameAnalytics build number.");
#else
Expand Down Expand Up @@ -72,6 +82,10 @@ public class GA_SettingsInspector : UnityEditor.Editor
private bool _debugSettingsIconOpen = false;
private GUIContent _debugSettingsIconMsg = new GUIContent("Debug settings allows you to enable info log for the editor or for builds (Xcode, etc.). Enabling verbose logging will show additional JSON messages in builds.");

private GUIContent _healthEventIcon;
private bool _healthEventIconOpen = false;
private GUIContent _healthEventIconMsg = new GUIContent("Enable automatic collection of performance metrics. Those will give you insight into your application's general performance such as fps, memory consumption and user hadrware");

private GUIContent _deleteIcon;
private GUIContent _homeIcon;
private GUIContent _infoIcon;
Expand Down Expand Up @@ -162,6 +176,11 @@ void OnEnable()
_debugSettingsIcon = new GUIContent(ga.InfoIcon, "Debug Settings.");
}

if (_healthEventIcon == null)
{
_healthEventIcon = new GUIContent(ga.InfoIcon, "Performance Metrics.");
}

if (_deleteIcon == null)
{
_deleteIcon = new GUIContent(ga.DeleteIcon, "Delete.");
Expand Down Expand Up @@ -1523,6 +1542,113 @@ public override void OnInspectorGUI()
EditorGUILayout.Space();
EditorGUILayout.Space();
EditorGUILayout.Space();

const int layoutWidth = 35;
const int btnSize = 12;

GUILayout.BeginVertical("Performance");

GUILayout.BeginHorizontal();
//GUILayout.Space(-4);
GUILayout.Label("Performance Metrics (EXPERIMENTAL)", EditorStyles.largeLabel);

if (GUILayout.Button(_healthEventIcon, EditorStyles.iconButton, new GUILayoutOption[] {
GUILayout.Width(btnSize),
GUILayout.Height(btnSize)
}))
{
_healthEventIconOpen = !_healthEventIconOpen;
}
GUILayout.EndHorizontal();

if (_healthEventIconOpen)
{
GUILayout.BeginHorizontal();
TextAnchor tmpAnchor = GUI.skin.box.alignment;
GUI.skin.box.alignment = TextAnchor.UpperLeft;
Color tmpColor = GUI.skin.box.normal.textColor;
GUI.skin.box.normal.textColor = new Color(0.7f, 0.7f, 0.7f);
RectOffset tmpOffset = GUI.skin.box.padding;
GUI.skin.box.padding = new RectOffset(6, 6, 5, 32);
GUILayout.Box(_healthEventIconMsg);
GUI.skin.box.alignment = tmpAnchor;
GUI.skin.box.normal.textColor = tmpColor;
GUI.skin.box.padding = tmpOffset;
GUILayout.EndHorizontal();

Rect tmpRect = GUILayoutUtility.GetLastRect();
if (GUI.Button(new Rect(tmpRect.x + 5, tmpRect.y + tmpRect.height - 25, 80, 20), "Learn more"))
{
Application.OpenURL("https://docs.gameanalytics.com");
}
}

EditorGUILayout.Space();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableHardwareTracking);
ga.EnableHardwareTracking = EditorGUILayout.Toggle("", ga.EnableHardwareTracking, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableMemoryTracking);
ga.EnableMemoryTracking = EditorGUILayout.Toggle("", ga.EnableMemoryTracking, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

EditorGUILayout.Space();
EditorGUILayout.Space();

GUILayout.BeginVertical("Startup Performance");

GUILayout.BeginHorizontal();
GUILayout.Space(-12);
EditorGUILayout.LabelField("Startup Performance", EditorStyles.boldLabel);
GUILayout.EndHorizontal();

EditorGUILayout.Space();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableSDKInitEvent);
ga.EnableSDKInitEvent = EditorGUILayout.Toggle("", ga.EnableSDKInitEvent, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableAppBootTracking);
ga.EnableAppBootTimeTracking = EditorGUILayout.Toggle("", ga.EnableAppBootTimeTracking, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

GUILayout.EndVertical();

EditorGUILayout.Space();
EditorGUILayout.Space();

GUILayout.BeginVertical("Session Performance");

GUILayout.BeginHorizontal();
GUILayout.Space(-12);
EditorGUILayout.LabelField("Session Performance", EditorStyles.boldLabel);
GUILayout.EndHorizontal();

EditorGUILayout.Space();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableHealthEvent);
ga.EnableHealthEvent = EditorGUILayout.Toggle("", ga.EnableHealthEvent, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableFPSHistogram);
ga.EnableFPSHistogram = EditorGUILayout.Toggle("", ga.EnableFPSHistogram, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

GUILayout.BeginHorizontal();
GUILayout.Label(_enableMemoryHistogram);
ga.EnableMemoryHistogram = EditorGUILayout.Toggle("", ga.EnableMemoryHistogram, GUILayout.Width(layoutWidth));
GUILayout.EndHorizontal();

GUILayout.EndVertical();

GUILayout.EndVertical();
}
#endregion // Settings.InspectorStates.Pref
}
Expand Down
Binary file modified Runtime/Android/gameanalytics.aar
Binary file not shown.
10 changes: 9 additions & 1 deletion Runtime/Scripts/Setup/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public struct HelpInfo
/// The version of the GA Unity Wrapper plugin
/// </summary>
[HideInInspector]
public static string VERSION = "7.7.0";
public static string VERSION = "7.7.1";

[HideInInspector]
public static bool CheckingForUpdates = false;
Expand Down Expand Up @@ -134,6 +134,14 @@ public struct HelpInfo
public bool SendExampleGameDataToMyGame = false;
//public bool UseBundleVersion = false;

public bool EnableSDKInitEvent = false;
public bool EnableHealthEvent = false;
public bool EnableHardwareTracking = false;
public bool EnableMemoryTracking = false;
public bool EnableFPSHistogram = false;
public bool EnableMemoryHistogram = false;
public bool EnableAppBootTimeTracking = false;

public bool InternetConnectivity;

public List<string> CustomDimensions01 = new List<string>();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.gameanalytics.sdk",
"version": "7.7.0",
"version": "7.7.1",
"displayName": "GameAnalytics",
"description": "GameAnalytics collects and stores your data with no limits. You can then view your core KPI's in order to see what areas of your game need to improvements. If you want to find out more about how gamers play, then add in funnels, progression events and resource tracking. ",
"unity": "2018.1",
Expand Down

0 comments on commit 220793a

Please sign in to comment.