Play Test - Search Player - (Unreal Engine module)
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 has a display name.
Device ID logins will create a user without a display name by default, meaning you can't search for those users by display name.
If you don't have a user with a display name, you can log in with your admin account using your email address and password using these 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 or studio namespace. You can now search for 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 a user to set their display name, you can invite the other user that's logged in with device ID. You will still need to have at least two different users in your game or studio namespace.
If you want to test using device ID login users on the same device, you can use Byte Wars's random device ID feature to log in using two different accounts. To do so, open the \Config\DefaultEngine.ini
file, locate the RandomizeDeviceId
variable 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.