Search Unity

UnityConnectSettings.asset

Discussion in 'Documentation' started by PhaneV, Feb 15, 2017.

  1. PhaneV

    PhaneV

    Joined:
    Aug 3, 2015
    Posts:
    9
    Hi...

    I was looking through the changes in my project when I stumbled upon : ProjectSettings/UnityConnectSettings.asset .

    What is this ? I searched it's name on google, but could only find other commits regarding it.

    Thanks, and sorry if this question is badly categorized.
    Kudos
     
    Qbit86 likes this.
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    It's a file that Unity editor uses when it's running. It's got no real issues or need for you to have knowledge of. Guess this is why it's not documented or discussed by others online.
     
  3. PhaneV

    PhaneV

    Joined:
    Aug 3, 2015
    Posts:
    9
    The reason I'm asking is because I sometimes see the file modified when pushing my changes on git.

    I'm using a Mac and a PC for development. I often switch from one to another and push modifications.

    Should I ignore the file and never commit it ?
    Should I keep the latest modified version and always commit it ?
     
    tscizzlebg and Qbit86 like this.
  4. viraf

    viraf

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    6
    UnityConnectSettings.asset stores information about which Unity Services is turned ON/OFF and other settings for the Services (e.g. Analytics, IAP, Ads, CrashReporting and PerformanceReporting).

    e.g. Calling Analytics Editor API to turn ON/OFF analytics for a build will cause UnityConnectSettings.asset file to change.

    using UnityEditor.Analytics;
    AnalyticsSettings.enabled = true;
     
    Wappenull and Eyeva like this.
  5. mikerandrup

    mikerandrup

    Joined:
    Jan 12, 2017
    Posts:
    1
    Is there any Unity account related sensitive data in there? I use the Unity services and have this file, but also want to open source my project (thus exposing this file publicly to the world).
     
    Rabadash8820 and sonofbryce like this.
  6. llFlexford

    llFlexford

    Joined:
    Jan 21, 2022
    Posts:
    24
    Code (CSharp):
    1. Object conenctSettingsRes = EditorResources.Load<Object>("ProjectSettings/UnityConnectSettings.asset");
    2.         SerializedObject conenctSettingsObj = new SerializedObject(conenctSettingsRes);
    3.         bool adsServiceEnabled = conenctSettingsObj.FindProperty("UnityAdsSettings").FindPropertyRelative("m_Enabled").boolValue;
    4.         string iosGameId = conenctSettingsObj.FindProperty("UnityAdsSettings").FindPropertyRelative("m_IosGameId").stringValue;
    5.         string androidGameId = conenctSettingsObj.FindProperty("UnityAdsSettings").FindPropertyRelative("m_AndroidGameId").stringValue;
     
  7. i16yue

    i16yue

    Joined:
    Aug 2, 2015
    Posts:
    4
    I'm using unity 2019. Recently I'm working about build app to launch on some app market. The market not allow app to get android_id (SystemInfo.deviceUniqueIdentifier) before confirm the privacy. I delete all code which called the SystemInfo.deviceUniqueIdentifier. But the app still get the android_id at start. Is there any service in Unity call the udid? And how to avoid? And I'm trying to modify the UnityConnectSetting.asset, set the "m_Enabled" to disable. But it sometime it will enable automatically. How to control it?