Skip to content

Commit b3549ac

Browse files
authored
FIX: Analytics errors on consoles by reverting changes from #1991 (#2024)
* Revert #1991 changes to analytics
1 parent bb685c5 commit b3549ac

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests.
1313
### Fixed
1414
- Fixed touch pointers being released twice causing an index out of bounds error. [ISXB-687](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-687)
1515
- Fixed `NullReferenceException` from disconnecting and reconnecting a GXDKGamepad.
16+
- Fixed "AnalyticsResult" errors on consoles [ISXB-1107]
1617

1718
### Added
1819
- Added the display of the device flag `CanRunInBackground` in device debug view.

Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ public Action onProjectChange
393393

394394
public void SendAnalytic(InputAnalytics.IInputAnalytic analytic)
395395
{
396+
#if ENABLE_CLOUD_SERVICES_ANALYTICS
396397
#if (UNITY_EDITOR)
397398
#if (UNITY_2023_2_OR_NEWER)
398399
EditorAnalytics.SendAnalytic(analytic);
@@ -404,14 +405,15 @@ public void SendAnalytic(InputAnalytics.IInputAnalytic analytic)
404405
EditorAnalytics.SendEventWithLimit(info.Name, analytic);
405406
#endif // UNITY_INPUT_SYSTEM_ENABLE_ANALYTICS || UNITY_2023_1_OR_NEWER
406407
#endif // UNITY_2023_2_OR_NEWER
407-
#elif (ENABLE_CLOUD_SERVICES_ANALYTICS) // Implicitly: !UNITY_EDITOR && UNITY_ANALYTICS
408+
#elif (UNITY_ANALYTICS) // Implicitly: !UNITY_EDITOR
408409
var info = analytic.info;
409410
Analytics.Analytics.RegisterEvent(info.Name, info.MaxEventsPerHour, info.MaxNumberOfElements, InputAnalytics.kVendorKey);
410411
if (analytic.TryGatherData(out var data, out var error))
411412
Analytics.Analytics.SendEvent(info.Name, data);
412413
else
413414
Debug.Log(error); // Non fatal
414415
#endif //UNITY_EDITOR
416+
#endif //ENABLE_CLOUD_SERVICES_ANALYTICS
415417
}
416418

417419
#endif // UNITY_ANALYTICS || UNITY_EDITOR

0 commit comments

Comments
 (0)