crossx-20-unreal
CROSSx Unreal Skill
Documentation
Instructions
Identify the request category first, then make the smallest C++ changes that fit the existing Unreal project structure.
Treat the CROSSx Unreal documentation linked above as the primary source for SDK usage, integration flow, and sample patterns.
If the bundled Unreal docs do not fully answer the question or the latest SDK behavior is unclear, prefer the official cross MCP server before unrelated documentation sources.
File Discovery
Before editing, find the existing integration points for plugin setup, deep link callback, SDK configuration, authentication flow, and wallet-related actions.
Check these first when they exist:
.Build.csfile (module dependency setup)AndroidManifest.xml(deep link intent filter for Android)Info.plist(URL scheme for iOS)GameInstanceorGameModeholding SDK initialization- Existing actor or subsystem calls to
UCrossySdkSubsystem
Prefer extending existing integration points over introducing new actors or subsystem wrappers.
Request Classification
Classify each request into one or more of these categories before writing code:
- SDK setup: plugin install,
.Build.csmodule dependency,FCrossySdkConfigvalues,Configure()+InitializeSdk(), deep link registration (Windows registry, Android manifest, iOS URL scheme) - Authentication: login provider (
ECrossyLoginProvider),SignInAsync/SignInWithCreateAsync, session restore viaInitializeSdk,EnsureLoggedInAndRefresh, sign-out,SignInAgainAsync - Wallet: wallet state check (
CheckWalletAsync), wallet setup (SetupWalletWithUIAsync/CreateWalletWithMigrateAsync), address lookup, wallet selection (SelectWalletWithUIAsync) - Signing and transactions: sign message, sign typed data (on-chain vs off-chain), sign transaction, send transaction, wait for receipt — always use UI-integrated (
WithUIAsync) variants - RPC and chain access:
WalletRpc/WalletRpcAsync,GetBalance,GetNonce, chain-specific read operations - UI and confirmation:
EnableSignConfirmation,ApplyTheme, theme tokens, biometrics - Events:
OnSignInComplete,OnSignOutComplete,OnSessionExpired - Locale:
SetLocale,GetLocale
If a request spans multiple categories, handle setup and authentication prerequisites before wallet, signing, transaction, or RPC work.
Preconditions
Confirm the required setup before implementing a feature.
- SDK setup requires a real
ProjectId,AppId, andAppNameprovided by the user or already present in project configuration. AppIdis required — it is used as the gateway whitelist identifier (X-App-Idheader).- The deep link callback scheme is
crossy-{ProjectId}— useFCrossySdkConfig::GetCustomUriScheme(). - Android requires an intent filter in
AndroidManifest.xmlwithandroid:scheme="crossy-{ProjectId}"oncom.epicgames.unreal.GameActivity. - iOS requires URL scheme registration in
Info.plistunder URL Types. - Windows registry entries are handled by the SDK's deep link adapter automatically.
- Use
ECrossySdkEnvironment::Development/Staging/Productionfor automatic URL resolution. UseCustomonly when overriding URLs manually. - Call
Configure(Config)thenInitializeSdk()on app start to attempt session restore. - Call
EnableSignConfirmation(AppName)before any sign/send operations to enable the confirmation modal UI. - Wallet and RPC work require a valid login state and the correct CAIP-2 chain ID (
eip155:<number>). - After login, wallet-dependent flows may still require wallet setup. Use
SetupWalletWithUIAsync()as the primary wallet setup method; it handles creation, migration, and verification internally. CreateWalletWithMigrateAsync(bMigrateAutomatically, ...)is the lower-level alternative — passtrueto auto-migrate,falseto surface migration errors for manual handling.- Always use UI-integrated signing/sending APIs (
SignMessageWithUIAsync,SignTransactionWithUIAsync, etc.). Low-level sync APIs require a private internalPrepare()call and should not be used directly. Frommust not be empty for all sign and send flows.- Use
SignTypedDataOffchainWithUIAsyncwhen the typed data has nodomain.chainId; useSignTypedDataWithUIAsyncwhen it does.
Guardrails
- Do not assume authentication is complete unless
Configure()+InitializeSdk()are called and the session flow is wired correctly. - Do not use wallet or RPC features as the default path before confirming login state.
- Do not use
WalletRpc/WalletRpcAsyncfor transaction signing or sending — they are read-only. - Do not use low-level sync signing APIs (
SignTransaction,SignMessage, etc.) directly — they require a privatePrepare()call. Always use theWithUIAsyncvariants instead. - Do not add new subsystem wrappers or actor layers when the feature can fit existing integration points.
- Do not guess unclear SDK behavior when the latest documentation or MCP resources should be checked first.
- Do not generate fallback values such as
unreal-host, placeholder app IDs, or sample project IDs forProjectIdorAppId. - If
ProjectIdorAppIdis missing, ask the user for them before writing SDK setup code.
Implementation Workflow
- Identify the feature category and the affected Unreal files.
- Inspect the existing project structure before making changes.
- Confirm the required setup before adding feature code.
- Apply the smallest code change that fits the existing architecture and style.
- Use the correct SDK APIs, CAIP-2 chain IDs, and delegate patterns.
- Review the affected files for integration gaps before finalizing.
Validation Checklist
Before finalizing CROSSx Unreal SDK changes, verify the following:
- The change matches the requested feature scope without unnecessary refactoring.
FCrossySdkConfigincludes a realProjectId,AppId, andAppName.- Android manifest has the correct deep link scheme (
crossy-{ProjectId}) when auth flows are used. Configure(Config)andInitializeSdk()are called on app start.EnableSignConfirmation(AppName)is called before sign/send operations.- Authentication, wallet, and RPC flows satisfy login and session requirements.
- After login, wallet state is handled via
SetupWalletWithUIAsync()orCreateWalletWithMigrateAsync()for wallet-dependent flows. - All signing/sending uses UI-integrated (
WithUIAsync) variants, not low-level sync APIs. Fromis non-empty in all sign and send calls.- On-chain vs off-chain typed data uses the correct method (
SignTypedDataWithUIAsyncvsSignTypedDataOffchainWithUIAsync). WalletRpcis only used for read-only call scenarios.- Errors are handled via result structs (
bSuccess,ErrorCode,ErrorMessage); handleSessionExpired(session expired modal shown by SDK) andAccountMismatch(re-auth returned different account) separately from other errors.
Updated about 21 hours ago