File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
com.unity.netcode.gameobjects/Editor Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11#if UNITY_EDITOR
22using System ;
33using System . Text ;
4+ #if ENABLE_NGO_ANALYTICS_LOGGING
5+ using UnityEngine ;
6+ #endif
47using UnityEngine . Analytics ;
58
69namespace Unity . Netcode . Editor
@@ -32,7 +35,7 @@ public override string ToString()
3235#if ENABLE_NGO_ANALYTICS_LOGGING
3336 internal void LogAnalytics ( int sessionNumber )
3437 {
35- Debug . Log ( $ "{ ToString ( ) } ") ;
38+ Debug . Log ( $ "{ nameof ( NetworkManagerAnalytics ) } Session- { sessionNumber } : \n { ToString ( ) } ") ;
3639 }
3740#endif
3841 public bool Equals ( NetworkManagerAnalytics other )
Original file line number Diff line number Diff line change 33using Unity . Netcode . Editor . Configuration ;
44using UnityEditor ;
55using UnityEngine ;
6+ #if ENABLE_NGO_ANALYTICS_LOGGING
7+ using UnityEngine . Analytics ;
8+ #endif
69using UnityEngine . SceneManagement ;
710
811namespace Unity . Netcode . Editor
@@ -242,14 +245,16 @@ public void UpdateAnalytics()
242245 {
243246 var networkManagerAnalytics = GetNetworkManagerAnalytics ( NetworkManager . RecentSessions [ i ] ) ;
244247
245- #if ENABLE_NGO_ANALYTICS_LOGGING
246- networkManagerAnalytics . LogAnalytics ( NetworkManager . RecentSessions [ i ] . SessionIndex ) ;
247- #endif
248+
248249 // If the previous session has no changes to the configuration then skip it (only unique configurations)
249250 if ( previousAnalytics . Equals ( networkManagerAnalytics ) )
250251 {
251252 continue ;
252253 }
254+
255+ #if ENABLE_NGO_ANALYTICS_LOGGING
256+ networkManagerAnalytics . LogAnalytics ( NetworkManager . RecentSessions [ i ] . SessionIndex ) ;
257+ #endif
253258 var result = EditorAnalytics . SendAnalytic ( new NetworkManagerAnalyticsHandler ( networkManagerAnalytics ) ) ;
254259#if ENABLE_NGO_ANALYTICS_LOGGING
255260 if ( result != AnalyticsResult . Ok )
You can’t perform that action at this time.
0 commit comments