Search Unity

Passing AnalyticsEvents between functions

Discussion in 'Unity Analytics' started by oliver_unity892, May 2, 2021.

  1. oliver_unity892

    oliver_unity892

    Joined:
    Oct 28, 2019
    Posts:
    56
    Hi all

    I have a main function that sends analytics events after checking whethet the app is running in the editor, whether the user has opted out etc etc.

    However, whilst I can pass an AnalyticsEvent to the function, I can't see how to action that event. Any ideas?

    So I want to do something like this:

    doAnalytics(analyticsevent.gameover)

    public bool doAnalytics(analyticsevent tempevent)
    {
    // do checks here
    analyticsresult result = tempevent;
    }

    Any ideas how I can make that work?

    Olly
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    11,712
unityunity