5
5
using Unity . MLAgents . Sensors ;
6
6
using UnityEngine ;
7
7
#if MLA_UNITY_ANALYTICS_MODULE
8
+
9
+ #if ENABLE_CLOUD_SERVICES_ANALYTICS
8
10
using UnityEngine . Analytics ;
11
+ #endif
12
+
9
13
#if UNITY_EDITOR
10
14
using UnityEditor . Analytics ;
11
15
#endif
@@ -43,7 +47,7 @@ internal static class TrainingAnalytics
43
47
44
48
private static bool s_SentEnvironmentInitialized ;
45
49
46
- #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE
50
+ #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE && ENABLE_CLOUD_SERVICES_ANALYTICS
47
51
/// <summary>
48
52
/// Whether or not we've registered this particular event yet
49
53
/// </summary>
@@ -64,7 +68,7 @@ internal static class TrainingAnalytics
64
68
65
69
internal static bool EnableAnalytics ( )
66
70
{
67
- #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE
71
+ #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE && ENABLE_CLOUD_SERVICES_ANALYTICS
68
72
if ( s_EventsRegistered )
69
73
{
70
74
return true ;
@@ -106,7 +110,7 @@ public static void SetTrainerInformation(string packageVersion, string communica
106
110
107
111
public static bool IsAnalyticsEnabled ( )
108
112
{
109
- #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE
113
+ #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE && ENABLE_CLOUD_SERVICES_ANALYTICS
110
114
return EditorAnalytics . enabled ;
111
115
#else
112
116
return false ;
@@ -135,7 +139,7 @@ public static void TrainingEnvironmentInitialized(TrainingEnvironmentInitialized
135
139
// Debug.Log(
136
140
// $"Would send event {k_TrainingEnvironmentInitializedEventName} with body {JsonUtility.ToJson(tbiEvent, true)}"
137
141
// );
138
- #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE
142
+ #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE && ENABLE_CLOUD_SERVICES_ANALYTICS
139
143
if ( AnalyticsUtils . s_SendEditorAnalytics )
140
144
{
141
145
EditorAnalytics . SendEventWithLimit ( k_TrainingEnvironmentInitializedEventName , tbiEvent ) ;
@@ -151,7 +155,7 @@ public static void RemotePolicyInitialized(
151
155
IList < IActuator > actuators
152
156
)
153
157
{
154
- #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE
158
+ #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE && ENABLE_CLOUD_SERVICES_ANALYTICS
155
159
if ( ! IsAnalyticsEnabled ( ) )
156
160
return ;
157
161
@@ -208,7 +212,7 @@ internal static TrainingBehaviorInitializedEvent SanitizeTrainingBehaviorInitial
208
212
[ Conditional ( "MLA_UNITY_ANALYTICS_MODULE" ) ]
209
213
public static void TrainingBehaviorInitialized ( TrainingBehaviorInitializedEvent rawTbiEvent )
210
214
{
211
- #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE
215
+ #if UNITY_EDITOR && MLA_UNITY_ANALYTICS_MODULE && ENABLE_CLOUD_SERVICES_ANALYTICS
212
216
if ( ! IsAnalyticsEnabled ( ) )
213
217
return ;
214
218
0 commit comments