UnityConnectSettings.asset

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

1 Like

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.

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 ?

2 Likes

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;

2 Likes

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).

2 Likes
Object conenctSettingsRes = EditorResources.Load<Object>("ProjectSettings/UnityConnectSettings.asset");
        SerializedObject conenctSettingsObj = new SerializedObject(conenctSettingsRes);
        bool adsServiceEnabled = conenctSettingsObj.FindProperty("UnityAdsSettings").FindPropertyRelative("m_Enabled").boolValue;
        string iosGameId = conenctSettingsObj.FindProperty("UnityAdsSettings").FindPropertyRelative("m_IosGameId").stringValue;
        string androidGameId = conenctSettingsObj.FindProperty("UnityAdsSettings").FindPropertyRelative("m_AndroidGameId").stringValue;

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?