How to disable Unity Analytics debug logging in release builds?

Every single Unity Analytics event writes out 2 logs with stack traces, one for "Recorded event," one for "
Serializing event," and then for every batch of events there are 2 more logs, "Uploading events..." and "Events uploaded successfully!" When trying to analyze a player's log files, I have to spend a few minutes removing all those events from the logs so I can see what's actually going on.

Is there any way to disable the unity analytics event logging in a release build? I couldn't find anything in the documentation.

It's very much not important that those events show up in the logs as there is no detail other than the event name anyway (Ah, yes I see you "usedItem" 300 times), and I'd rather not waste the CPU time decoding the stack trace and writing to the log file, especially on mobile devices.

Hi @levi9000 ,
Thanks for posting on the forums!

You must remove the UNITY_ANALYTICS_EVENT_LOGS when it is time to release your game.

  • Go to Project Settings > Player Settings > Player.
  • Go to Script Compilation section > Scripting Define Symbols.
  • Click Apply.

More info can be found here:

All the best,

AHHHHH, thank you! I was too busy looking for a setting or function in the SDK.

1 Like