Getting Started
Unreal SDK — Getting Started
Skill — Download
This guide shows the minimum setup to run OAuth login and wallet actions with the CROSSx Unreal SDK.
Requirements
- Unreal Engine 5.x
- C++ project (Blueprint-only projects need a C++ shim)
1) Install the Plugin
Copy the CROSSxSdkUnrealPlugin folder into your project's Plugins/ directory:
YourProject/
├── Plugins/
│ └── CROSSxSdkUnrealPlugin/
│ ├── CROSSxSdkUnrealPlugin.uplugin
│ └── Source/
└── Source/
Add the module to your project's .Build.cs:
PublicDependencyModuleNames.AddRange(new string[] {
"CROSSxSdkUnrealPlugin"
});2) Configure deep link callback
OAuth completes in a native browser and redirects back using a custom URI scheme: crossx-{ProjectId}.
Windows
Registry entries are handled by the SDK's deep link adapter. For manual setup, add a registry key:
HKCU\Software\Classes\crossx-YOUR_PROJECT_ID\shell\open\command
Android
Add an intent filter in your AndroidManifest.xml:
<activity android:name="com.epicgames.unreal.GameActivity"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="crossx-YOUR_PROJECT_ID" />
</intent-filter>
</activity>iOS
Register the URL scheme in your project's Info.plist under URL Types.
3) Configure the SDK
The SDK is accessed via UCROSSxSdkSubsystem, a UGameInstanceSubsystem.
UCROSSxSdkSubsystem* Sdk = GetGameInstance()->GetSubsystem<UCROSSxSdkSubsystem>();
FCROSSxSdkConfig Config;
Config.ProjectId = TEXT("YOUR_PROJECT_ID");
Config.AppId = TEXT("com.example.myapp");
Config.AppName = TEXT("My Game");
Config.Environment = ECROSSxSdkEnvironment::Development; // resolves URLs automatically
Config.Theme = ECROSSxThemeMode::Dark;
Sdk->Configure(Config);Environment-based URL resolution
| Environment | OAuth Server | Auth API | Gateway |
|---|---|---|---|
| Development | dev-cross-wallet-oauth.crosstoken.io | dev-cross-auth.crosstoken.io | dev-embedded-wallet-gateway.crosstoken.io/api/v1 |
| Staging | stg-cross-wallet-oauth.crosstoken.io | stg-cross-auth.crosstoken.io | stg-embedded-wallet-gateway.crosstoken.io/api/v1 |
| Production | cross-wallet-oauth.crosstoken.io | cross-auth.crosstoken.io | embedded-wallet-gateway.crosstoken.io/api/v1 |
| Custom | Set OAuthServerUrl, AuthApiUrl, EmbeddedWalletGatewayUrl manually |
4) Initialize and enable confirmation UI
FCROSSxAuthResult AuthResult = Sdk->InitializeSdk();
if (AuthResult.bSuccess)
{
UE_LOG(LogTemp, Log, TEXT("Session restored: %s"), *AuthResult.WalletAddress);
}
Sdk->EnableSignConfirmation(TEXT("My Game"), ECROSSxThemeMode::Dark);5) Basic auth flow
// Synchronous
FCROSSxAuthResult Auth = Sdk->SignIn(ECROSSxLoginProvider::Google);
// Asynchronous
Sdk->SignInAsync(ECROSSxLoginProvider::Google,
FCROSSxAuthResultDelegate::CreateLambda([](const FCROSSxAuthResult& Result)
{
UE_LOG(LogTemp, Log, TEXT("SignIn %s"), Result.bSuccess ? TEXT("OK") : TEXT("FAIL"));
})
);
// Sign out
Sdk->SignOut();6) Basic wallet flow
FString ChainId = TEXT("eip155:612044");
FCROSSxGetAddressResponse Addr = Sdk->GetAddress();
FString Balance = Sdk->GetBalance(Addr.Address, ChainId);Updated about 18 hours ago