com.unity.services.analytics 5.1.0
com.unity.services.analytics
Source docsNotes: processedReleased January 25, 2024
Unity Compatibility
Minimum Unity: 2019.4
Package Dependencies
- com.unity.modules.jsonserialize (1.0.0)
- com.unity.services.core (1.10.1)
- com.unity.ugui (1.0.0)
✨ Features
- New `RecordEvent(...)` API which takes an instance of the new `Unity.Services.Analytics.Event` class
- - This enables you to codify custom event schemas in helper objects by making your own sub-classes of `Event`, to avoid the risks inherent in directly using plain dictionaries with string keys
- - Event objects can also be pooled and reused because they are cleared immediately once their contents have been serialized
- - A generic `CustomEvent` class is available which can be used in a flexible, dictionary-like way if you do not wish to make your own full sub-classes
- ### Deprecated
- Standard Event recording methods that take `...Parameters` helper structs are now deprecated. Please replace them with the new `Event` sub-classes and use the new `RecordEvent(...)` method.
- - TransactionParameters -> TransactionEvent
- - TransactionFailedParameters -> TransactionFailedEvent
- - AdImpressionParameters -> AdImpressionEvent
- - AcquisitionSourceParameters -> AcquisitionSourceEvent
- CustomData(...) methods
- - Use RecordEvent(string) for events with no parameters
- - Use RecordEvent(event) for events with parameters, by using CustomEvent or creating your own sub-class of Event to contain the parameters
- ### Improved
- Improved the descriptions of some properties on the `AdImpressionParameters` class
