概要 - フレンドを追加する - (Unity モジュール)
Last updated on October 23, 2024
Introduction
Players may want to invite each other to become friends to make it easier to play together. In this module, you will learn how to display a list of friend requests, and implement accepting, rejecting, or canceling those requests.
Prerequisites
To have completed the following modules:
- Search for players
- OPTIONAL: Login with Steam for testing purposes.
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": ["FriendEssentials"],
"forceDisabledOtherModules" : true,
}
Learning objectives
At the end of this module, you will know how to implement:
- Requesting and displaying sent and received friend requests.
- Accepting or rejecting received friend requests.
- Canceling sent friend requests.
Preview
At the end of this module, your project will look like the images below with the following logs:
Success to accept friend {friendId}
Success to reject friend request {friendId}
Success to cancel outgoing friend request {friendId}.