示例#1
0
        public static void updateAttribution(Dictionary <string, string> attribution, AttributionNetwork source, string networkUserId, MonoBehaviour gameObject)
        {
                        #if !UNITY_EDITOR
            int sourceInt = -1;
            switch (source)
            {
            case AttributionNetwork.Appsflyer:
                sourceInt = 0;
                break;

            case AttributionNetwork.Adjust:
                sourceInt = 1;
                break;

            case AttributionNetwork.Branch:
                sourceInt = 2;
                break;

            case AttributionNetwork.Custom:
                sourceInt = 3;
                break;
            }
            string attributionJson = Json.Serialize(attribution);
                                #if UNITY_IOS
            AdaptyiOS.updateAttribution(attributionJson, sourceInt, networkUserId, gameObject ? gameObject.name : null);
                                #elif UNITY_ANDROID
            AdaptyAndroid.updateAttribution(attributionJson, sourceInt, networkUserId, gameObject ? gameObject.name : null);
                                #endif
                        #endif
        }
示例#2
0
 public void AddAttributionData(string dataJSON, AttributionNetwork network)
 {
     wrapper.AddAttributionData((int)network, dataJSON);
 }
示例#3
0
 public void AddAttributionData(string dataJson, AttributionNetwork network, string networkUserId = null)
 {
     _wrapper.AddAttributionData((int)network, dataJson, networkUserId);
 }
示例#4
0
 public void AddAttributionData(string dataJson, AttributionNetwork network)
 {
     _wrapper.AddAttributionData((int)network, dataJson);
 }