public void OnButton1Clicked() { Button1ClickCount++; // Log event by name, without data LogSession.Log("Button1Clicked"); }
public void OnButton3Clicked() { Button3ClickCount++; // Log event by type; name will be derived from class name, and object contents will be serialized into JSON data ButtonClicked data = new ButtonClicked("Button 3", Button2ClickCount); LogSession.Log(data); }
public void OnButton2Clicked() { Button2ClickCount++; // Log event by name, with JSON data ButtonClicked data = new ButtonClicked("Button 2", Button2ClickCount); string jsonData = JsonUtility.ToJson(data); LogSession.Log("ButtonClicked", jsonData); }