Step 4 of 4

See your first player.

Run the example in your Unreal project and check the response there.

UnrealPrepare your projectChange
Video coming later

This step does not have a video yet. The guide and MCP request are ready to use.

First player request in UnrealUnreal Engine

Finish setup before confirming your first request. Connect

Drop HorizonAuthExample into your level and press Play

Open the plugin’s C++ Classes in the Content Browser and find HorizonAuthExample. The included actor connects and signs in a player. Then open the Output Log. You do not need a new C++ class for this.

Alternative: your own code example
C++
Source/MyGame/MyActor.cpp
horizOn call
1#include "MyActor.h"
2#include "HorizonSubsystem.h"
3#include "Engine/GameInstance.h"
4#include "Managers/HorizonAuthManager.h"
5​
6void AMyActor::BeginPlay()
7{
8 Super::BeginPlay();
9​
10 // horizOn: initialize, connect to the nearest server, sign in
11 // anonymously.
12 // Get the horizOn Subsystem from your GameInstance
13 UHorizonSubsystem* HorizonSDK = GetGameInstance()->GetSubsystem<UHorizonSubsystem>();
14​
15 // Connect to server (auto-selects lowest latency host)
16 HorizonSDK->OnConnected.AddDynamic(this, &AMyActor::OnConnected);
17 HorizonSDK->ConnectToServer();
18}
19​
20void AMyActor::OnConnected()
21{
22 // Sign up anonymously
23 UHorizonSubsystem* HorizonSDK = GetGameInstance()->GetSubsystem<UHorizonSubsystem>();
24 HorizonSDK->Auth->SignUpAnonymous(
25 TEXT("TestPlayer"),
26 FOnAuthComplete::CreateLambda([](bool bSuccess)
27 {
28 if (bSuccess)
29 {
30 UE_LOG(LogTemp, Log, TEXT("Signed in successfully!"));
31 }
32 })
33 );
34}

Here is what should happen

The anonymous player signs in successfully. Your Console, Output or terminal shows a successful response with a player name or userId. You can also check the player in the selected project’s Users area.

Confirm the result from your own project. Existing dashboard players do not prove this new connection.

Open Users
No response yet?

Check the active project key, JSON import and backend addresses. Restart your project after importing. For a 401, check the full key; for network errors, check the reachable backend address and console output.

Also: check the API in the dashboard

The API Explorer helps with debugging. Still verify the first request from your own game afterwards.

API Explorer1:05
Open video separately ↗
Open the API Explorer
Back