|
9 | 9 | using System.Reflection; |
10 | 10 | using UnityEditor; |
11 | 11 | using UnityEditorInternal; |
12 | | - |
13 | 12 | #endif |
14 | 13 |
|
15 | 14 | // This should be the only file referencing the API at UnityEngineInternal.Input. |
@@ -394,22 +393,24 @@ public Action onProjectChange |
394 | 393 |
|
395 | 394 | public void SendAnalytic(InputAnalytics.IInputAnalytic analytic) |
396 | 395 | { |
| 396 | + #if ENABLE_CLOUD_SERVICES_ANALYTICS |
397 | 397 | #if (UNITY_EDITOR) |
398 | | - #if (UNITY_2023_2_OR_NEWER) |
| 398 | + #if (UNITY_2023_2_OR_NEWER) |
399 | 399 | EditorAnalytics.SendAnalytic(analytic); |
400 | | - #else |
| 400 | + #else |
401 | 401 | var info = analytic.info; |
402 | 402 | EditorAnalytics.RegisterEventWithLimit(info.Name, info.MaxEventsPerHour, info.MaxNumberOfElements, InputAnalytics.kVendorKey); |
403 | 403 | EditorAnalytics.SendEventWithLimit(info.Name, analytic); |
404 | | - #endif // UNITY_2023_2_OR_NEWER |
405 | | - #elif UNITY_ANALYTICS // Implicitly: !UNITY_EDITOR |
| 404 | + #endif // UNITY_2023_2_OR_NEWER |
| 405 | + #elif (UNITY_ANALYTICS) // Implicitly: !UNITY_EDITOR |
406 | 406 | var info = analytic.info; |
407 | 407 | Analytics.Analytics.RegisterEvent(info.Name, info.MaxEventsPerHour, info.MaxNumberOfElements, InputAnalytics.kVendorKey); |
408 | 408 | if (analytic.TryGatherData(out var data, out var error)) |
409 | 409 | Analytics.Analytics.SendEvent(info.Name, data); |
410 | 410 | else |
411 | | - Debug.Log(error); // Non fatal |
412 | | - #endif // UNITY_EDITOR |
| 411 | + Debug.Log(error); // Non fatal |
| 412 | + #endif //UNITY_EDITOR |
| 413 | + #endif //ENABLE_CLOUD_SERVICES_ANALYTICS |
413 | 414 | } |
414 | 415 |
|
415 | 416 | #endif // UNITY_ANALYTICS || UNITY_EDITOR |
|
0 commit comments