プレイテスト - プレイヤーを検索する - (Unreal Engine モジュール)
Search and invite player by display name
To test this feature, you need to make sure you have another user to search for in your namespace that have display name.
Login with Device ID will create user without display name by default. Meaning you can't search those users with display name.
If you don't have any user with display name, you can log in with your admin account using email and password using this launch parameters:
"PathToEngine\UnrealEditor.exe" "PathToProject\AccelByteWars.uproject" -game -AUTH_TYPE=ACCELBYTE -AUTH_LOGIN=<email> -AUTH_PASSWORD=<password>
Once you have logged in once, the user will be created in the game studio namespace. You can now search that user by its display name.
Compile your project and open it in the Unreal Editor.
Play the game in the Editor, log in, and navigate to Social > Find Friends.
Type the display name of the target user and press Enter or click the Search button. Then, send the friend request. If the implementation was successful, your project will look like the image below, and will display the following log.
LogFriendsEssentials: Warning: Success to send a friend request.
Invite player by friend code
Since this feature does not require user to set their display name, you can invite other logged in with Device ID user. You would still need to have at least two different user in your game studio namespace.
If you want to test using Device ID login users, within the same device, you can use Byte Wars's random Device ID feature to log in into two different account.
To do so, open the \Config\DefaultEngine.ini
file, locate the RandomizeDeviceId
var under the [AccelByte.Dev]
category, and set its value to true
.
Compile your project and open it in the Unreal Editor.
Play two game instances in the Editor, log in, and navigate to Social > Find Friends.
On the first instance, click the Copy Code button on the side of the user's friend code.
On the second, paste the code to the search bar and press Enter or click the Search button. If the implementation was successful and the code is correct, your project will look like the image below, and will display the following log.
LogFriendsEssentials: Warning: Success to get self friend code: <code>
LogFriendsEssentials: Warning: Success to send a friend request by friend code.