メインコンテンツまでスキップ

SDK を使用してフレンドリストのクエリを実行する - フレンドリストを表示する - (Unity モジュール)

Last updated on May 30, 2024

Implement getting friend list

Open FriendsEssentialsWrapper_Starter.cs and create a function called GetFriendList. This function will retrieve the friend list.

public void GetFriendList(ResultCallback<Friends> resultCallback = null)
{
_lobby.LoadFriendsList(result =>
{
if (!result.IsError)
{
Debug.Log($"Success to get friend list");
}
else
{
Debug.LogWarning(
$"Error LoadFriendsList, Error Code: {result.Error.Code} Error Message: {result.Error.Message}");
}
resultCallback?.Invoke(result);
});
}

Resources