Analytics.limitUserTracking

Cambiar al Manual
public static bool limitUserTracking ;

Descripción

Controls whether to limit user tracking at runtime.

Setting this property to true causes the Analytics service to further anonymize data by not sending SystemInfo.deviceUniqueIdentifier for game users. By default limitUserTracking is false.

using System;
using UnityEngine;
using UnityEngine.Analytics;

public class DataPrivacyOptInFlow { [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void InitStepOne() { Analytics.initializeOnStartup = false; }

public void EnableAnonymizingData() { Analytics.limitUserTracking = true; }

// Call this when the user has given limited data collection permission public void UserHasOptedIntoLimitedDataCollection_LetsResumeAnalyticsInitialization() { EnableAnonymizingData(); Analytics.ResumeInitialization(); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961