如何在playfab和光子朋友的信息之间合并Unity 3d

问题描述

我正在使用 playfab列表 。我想找到一个玩家是否在线。只有光子可以做到,而且我不知道如何编写可以添加到playfab列表中的函数(如果添加,它说不能将playfab转换为光子。 )

    private void displayPlayfabFriends(List<PlayFab.ClientModels.FriendInfo> friendCache)
    {
        foreach (PlayFab.ClientModels.FriendInfo f in friendCache)
        {
            bool isfound = false;
            if(myfriends != null)
            {
                foreach (PlayFab.ClientModels.FriendInfo g in myfriends)
                {
                    if (f.FriendplayFabId == g.FriendplayFabId)
                    {
                        isfound = true;
                    }
                }
            }
            if(isfound == false)
            {
                UIFriend listing = Instantiate(uiPrefab,container);
                if(listing != null)
                {
                    listing.Initialize(f);
                    listing.friendNameText.text = f.TitledisplayName;

                }
            }
        }
        myfriends = friendCache;
    }

f g 是playfab好友列表

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)