Beispiel #1
0
    public void setSegment(IronSourceSegment segment)
    {
        Dictionary <string, string> dict = segment.getSegmentAsDict();
        string json = IronSourceJSON.Json.Serialize(dict);

        CFSetSegment(json);
    }
Beispiel #2
0
    public void setSegment(IronSourceSegment segment)
    {
        Dictionary <string, string> dict = segment.getSegmentAsDict();
        string json = IronSourceJSON.Json.Serialize(dict);

        getBridge().Call("setSegment", json);
    }
        protected virtual void SetupSegment(IronSourceSettings.SegmentSettings segmentSettings)
        {
            #if EM_IRONSOURCE
            if (segmentSettings == null)
            {
                Debug.LogError("SengmentSettings is null!!!");
                return;
            }

            IronSourceSegment newSegment = segmentSettings.ToIronSourceSegment();
            if (newSegment == null)
            {
                Debug.LogError("Segment is null!!!");
                return;
            }

            IronSource.Agent.setSegment(newSegment);
            #endif
        }
            public IronSourceSegment ToIronSourceSegment()
            {
                IronSourceSegment segment = new IronSourceSegment
                {
                    age              = this.age,
                    gender           = this.gender,
                    level            = this.level,
                    isPaying         = isPaying ? 1 : 0,
                    userCreationDate = this.userCreationDate,
                    iapt             = this.iapt,
                    segmentName      = this.segmentName,
                };

                if (customParams != null)
                {
                    foreach (var param in customParams)
                    {
                        segment.setCustom(param.Key, param.Value);
                    }
                }

                return(segment);
            }
Beispiel #5
0
    /// <summary>
    /// 设置玩家属性 必须在初始化App之前调用
    /// </summary>
    /// <param name="level">玩家等级</param>
    /// <param name="iapt">购买总金额</param>
    /// <param name="userCreationDate">创建时间 首次进游戏时间</param>
    /// <param name="att">自定义参数 最多5个 key和value都为string类型 </param>
    public void SetAdsUserInfo(int level, double iapt, long userCreationDate, LuaTable att)
    {
        string id = IronSource.Agent.getAdvertiserId();

        IronSource.Agent.setUserId(id);
        EzDebug.Log("unity-script: getAdvertiserId" + id);

        IronSourceSegment segment = new IronSourceSegment();

        segment.level            = level;
        segment.iapt             = iapt;
        segment.userCreationDate = userCreationDate;

        //自定义参数最多5个
        if (att != null)
        {
            att.ForEach <string, string>((k, v) =>
            {
                segment.customs.Add(k, v);
            });
        }

        IronSource.Agent.setSegment(segment);
    }
 public void setSegment(IronSourceSegment segment)
 {
     _platformAgent.setSegment(segment);
 }
Beispiel #7
0
 public void setSegment(IronSourceSegment segment)
 {
     Debug.Log("Unsupported Platform");
 }
 public void setSegment(IronSourceSegment segment)
 {
 }