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

Unreal Engine Module - Add a Friend - Overview

Last updated on January 13, 2024

Introduction

In the previous module, we showed you how to find potential friends and invite them to become a friend, but we didn't implement a way for the invited player to accept or reject the invitation. In this module, you will learn how to display a list of friend requests and perform accept, reject, or cancel those requests.

Prerequisites

In order to start on this module you will need to have the following.

  • Complete Module: Search Player.
  • Byte Wars's tutorialmodules branch from our GitHub repository and have configured the SDK.
  • Force enable this module by adding the following code to the Config/DefaultEngine.ini file.
    [AccelByteTutorialModules]
    +ForcedEnabledModules=TutorialModule:FRIENDSESSENTIALS
    ...

Learning Objectives

At the end of this tutorial, you will understand:

  • How to request and display sent and received friend requests.
  • How to accept or reject received friend requests.
  • How to cancel sent friend requests.

Preview

At the end of this tutorial, you will get results similar to the image below.

  • Accept Received Friend Request. When it is successful, you should see a scenario and log like this.

    Accept a received friend request demo

    LogFriendsEssentials: Warning: Success to accept a friend request.
  • Reject Received Friend Request. When it is successful, you should see a scenario and log like this.

    Reject a received friend request demo

    LogFriendsEssentials: Warning: Success to reject a friend request.
  • Cancel Sent Friend Request. When it is successful, you should see a scenario and log like this.

    Cancel sent friend request demo

    LogFriendsEssentials: Warning: Success to cancel a friend request.

References