0

I'm having some problems with Playscape Analytics. When I try to report level start, I get the error below:

 I/Unity   ( 6366): NullReferenceException: Object reference not set to an instance of an object
 I/Unity   ( 6366):   at Playscape.Analytics.Report.ReportLevelStarted (System.String level, IDictionary`2 additionalParams) [0x00000] in <filename unknown>:0 
 I/Unity   ( 6366):   at GreenroomScript.Start () [0x00000] in <filename unknown>:0

Here is the line of code I am using:

Report.Instance.ReportLevelStarted(AppHelper.sharedHelper().missionManager.m_activeMissionSet.ToString(), null);

AppHelper.sharedHelper().missionManager.m_activeMissionSet.ToString(); is printing the string.

Anyone have any ideas of what the problem is?

Serlite
  • 12,130
  • 5
  • 38
  • 49

1 Answers1

2

In

public void ReportLevelStarted(string level, IDictionary<string, double> additionalParams)

method additionalParams can not be null. Instead of null pass an empty dictionary.

frogatto
  • 28,539
  • 11
  • 83
  • 129
Artem
  • 128
  • 5