概要 - プレイヤーを検索する - (Unity モジュール)
Last updated on December 13, 2024
Introduction
In this module, you will learn how to enable searching for players and adding them as friends.
Prerequisites
In order to complete this module, you will need:
To have completed the Login with device ID module.
The Byte Wars
tutorialmodules
branch checked out in your local Byte Wars Unity project repository.To have force enabled this module. You can do this by adding the following code to the
Assets/Resources/Modules/TutorialModuleConfig.json
file:{
"enableModulesOverride": true,
"forceEnabledModules": ["FriendsEssentials"],
}
Learning objectives
At the end of this module, you will know how to implement:
- Searching for players by display names
- Inviting players to become friends
- Inviting players to become friends using friend code
Preview
At the end of this module, your project will look like the images below and the following log:
Search for players by display name:
[FriendsEssentialsWrapper_Starter] [GetUserByExactDisplayName] [327] - Successfully found users for display name: {displayName}
Search for players by friend code:
[FriendsEssentialsWrapper_Starter] [GetUserByFriendCode] [258] - Successfully retrieved user profile public info by public id.