Issue:
- Updating a project to a newer version of the Unity Editor has caused unexpected Analytics Package warnings or error messages.
Cause:
Updating a project to a new version of Unity will force the Package Manager to import the latest version of the Analytics package into the project. This may be newer and contain differences in the way events are recorded from the version used when the project was last built.
There have been numerous updates to the In-App Purchasing package in the last couple of years, they can be viewed in the Analytics ChangeLog.
Resolution:
If your previous solution was using the CustomData method you will need to change this to RecordEvent, see below for an example;
MyEvent myEvent = new MyEvent
{
FabulousString = "hello there",
SparklingInt = 1337,
SpectacularFloat = 0.451f,
PeculiarBool = true
};
AnalyticsService.Instance.RecordEvent(myEvent);
You can also you the debug panel that was introduced in version 6.0.0 to make sure events are being recorded correctly. You can find this by going to Services > Analytics > Debug Panel, more information on this can be found here.