How do I use the find friends script?

scrollPosition = GUI.BeginScrollView(new Rect(800, 150, 100, 200), scrollPosition, new Rect(0, 0, 0, 1000));
buddy_selected = GUILayout.SelectionGrid(buddy_selected, buddy_list, 1);
GUI.EndScrollView();

So this shows a scroll box with buddy_list, which is an array of your user's buddy's. how would I use the FindFriends script with this to show which buddies are online? The buddy list is all from using app42 backend service so I don't really know how to tie them together.

I have the client's user name saved in a playerPref "userName" and it's hooked up to a database so I just need to know how to make it so it shows if you're online.

Comments

  • You can set the userID of app42 as playername before you connect. If everyone does that, you need your friends' userIDs as string[] to find them as friends.
    The friend list of Photon then needs to be mapped to the entries in the grid.
  • The friend list of Photon then needs to be mapped to the entries in the grid

    How do I do this? Not even sure what that means lol. I have the buddy list in a string[] already.
  • I meant: You have the list of friends which you want to show. Per entry, you have more info in the friend list: Online-state and game.
    Per friend you show name, online state and game (if available).

    With the friends string[] you can call FindFriends. When the result is available it's stored in in the Friends list. Per entry, you get all values you need.