Events.deprecated.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. namespace Unity.Services.Analytics
  3. {
  4. [Obsolete("The interface provided by this static class has moved to AnalyticsService.Instance, and should be accessed from there instead. This API will be removed in an upcoming release.")]
  5. public static partial class Events
  6. {
  7. /// <summary>
  8. /// This is the URL for the Unity Analytics privacy policy. This policy page should
  9. /// be presented to the user in a platform-appropriate way along with the ability to
  10. /// opt out of data collection.
  11. /// </summary>
  12. [Obsolete("The interface provided by this field has moved to AnalyticsService.Instance.PrivacyUrl, and should be accessed from there instead. This API will be removed in an upcoming release.")]
  13. public static readonly string PrivacyUrl = "https://unity3d.com/legal/privacy-policy";
  14. /// <summary>
  15. /// Opts the user out of sending analytics from all legislations.
  16. /// To deny consent for a specific opt-in legislation, like PIPL, use `ProvideConsent(string key, bool consent)` method)
  17. /// All existing cached events and any subsequent events will be discarded immediately.
  18. /// A final 'forget me' signal will be uploaded which will trigger purge of analytics data for this user from the back-end.
  19. /// If this 'forget me' event cannot be uploaded immediately (e.g. due to network outage), it will be reattempted regularly
  20. /// until successful upload is confirmed.
  21. /// Consent status is stored in PlayerPrefs so that the opted-out status is maintained over app restart.
  22. /// This action cannot be undone.
  23. /// </summary>
  24. /// <exception cref="ConsentCheckException">Thrown if the required consent flow cannot be determined..</exception>
  25. [Obsolete("The interface provided by this method has moved to AnalyticsService.Instance.OptOut, and should be accessed from there instead. This API will be removed in an upcoming release.")]
  26. public static void OptOut()
  27. {
  28. AnalyticsService.Instance.OptOut();
  29. }
  30. /// <summary>
  31. /// Forces an immediately upload of all recorded events to the server, if there is an internet connection.
  32. /// </summary>
  33. /// <exception cref="ConsentCheckException">Thrown if the required consent flow cannot be determined..</exception>
  34. [Obsolete("The interface provided by this method has moved to AnalyticsService.Instance.Flush, and should be accessed from there instead. This API will be removed in an upcoming release.")]
  35. public static void Flush()
  36. {
  37. AnalyticsService.Instance.Flush();
  38. }
  39. }
  40. }