public UnityConnectSettings(AssetInfo assetInfo, bool _) :
     base(assetInfo)
 {
     TestEventUrl           = string.Empty;
     TestConfigUrl          = string.Empty;
     CrashReportingSettings = new CrashReportingSettings(true);
     UnityAnalyticsSettings = new UnityAnalyticsSettings(true);
     UnityAdsSettings       = new UnityAdsSettings(true);
 }
Exemplo n.º 2
0
 override public void EnableService(bool enabled)
 {
     if (CrashReportingSettings.enabled != enabled)
     {
         CrashReportingSettings.SetEnabledServiceWindow(enabled);
         EditorAnalytics.SendEventServiceInfo(new CrashReportingServiceState()
         {
             crash_reporting = enabled
         });
     }
 }
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            if (IsReadEnabled(reader.Version))
            {
                Enabled  = reader.ReadBoolean();
                TestMode = reader.ReadBoolean();
                reader.AlignStream(AlignType.Align4);
            }
            if (IsReadOldEventUrl(reader.Version))
            {
                TestEventUrl = reader.ReadString();
            }
            if (IsReadEventUrl(reader.Version))
            {
                EventUrl = reader.ReadString();
            }
            if (IsReadTestConfigUrl(reader.Version))
            {
                TestConfigUrl = reader.ReadString();
            }
            if (IsReadTestInitMode(reader.Version))
            {
                TestInitMode = reader.ReadInt32();
            }
            if (IsReadEnabled(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadCrashReportingSettings(reader.Version, reader.Platform, reader.Flags))
            {
                CrashReportingSettings.Read(reader);
            }
            if (IsReadUnityPurchasingSettings(reader.Version, reader.Platform, reader.Flags))
            {
                UnityPurchasingSettings.Read(reader);
            }
            if (IsReadUnityAnalyticsSettings(reader.Version, reader.Platform, reader.Flags))
            {
                UnityAnalyticsSettings.Read(reader);
            }
            if (IsReadUnityAdsSettings(reader.Version, reader.Platform, reader.Flags))
            {
                UnityAdsSettings.Read(reader);
            }
            if (IsReadPerformanceReportingSettings(reader.Version, reader.Platform, reader.Flags))
            {
                PerformanceReportingSettings.Read(reader);
            }
        }
Exemplo n.º 4
0
        protected override void InternalEnableService(bool enable, bool shouldUpdateApiFlag)
        {
            if (CrashReportingSettings.enabled != enable)
            {
                CrashReportingSettings.SetEnabledServiceWindow(enable);
                EditorAnalytics.SendEventServiceInfo(new CrashServiceState()
                {
                    crash_reporting = enable
                });
            }

            base.InternalEnableService(enable, shouldUpdateApiFlag);
        }
Exemplo n.º 5
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.Add("m_Enabled", Enabled);
            node.Add("m_TestMode", TestMode);
            node.Add("m_TestEventUrl", TestEventUrl);
            node.Add("m_TestConfigUrl", TestConfigUrl);
            node.Add("m_TestInitMode", TestInitMode);
            node.Add("CrashReportingSettings", CrashReportingSettings.ExportYAML(container));
            node.Add("UnityPurchasingSettings", UnityPurchasingSettings.ExportYAML(container));
            node.Add("UnityAnalyticsSettings", UnityAnalyticsSettings.ExportYAML(container));
            node.Add("UnityAdsSettings", UnityAdsSettings.ExportYAML(container));
            node.Add("PerformanceReportingSettings", PerformanceReportingSettings.ExportYAML(container));
            return(node);
        }