Links

Unreal

Resources

Prerequisites

Unreal Engine 5

Installation

Install Particle SDK to local UE5 project
  • Open your project root directory which [ProjectName].uproject locate at
  • Create a directory, and set its name to Plugins . If Plugins already exists, skip this step.
  • Copy directory Plugins/ParticleSDK of Particle SDK to Plugins directory.
Open UE5 Editor, navigator to Menu → Edit → Plugins , check the option to enable ParticleSDK.

Auth Service

Try our demo for more use cases.

Initialize

initialize ParticleSDK create a Init function in the Widget Blueprint, and then complete its parameters.
  • Default Browser Widget: it can be set to W_ExecuteWebBrowser of Particle SDK. If you want to use your custom WebBrowser Blueprint, it must follow the structure of W_ExecuteWebBrowser
  • In Config: Json string, required project id, client key and appId, could have more parameters, for more details, click here​
  • In Theme: Json string, could be empty, it works for custom web wallet ui, for more details, click here​
  • In Language: support en-US, zh-CN, zh-TW, ja-JP, ko-KR
  • In Chain Name / In Chain Id: support EVM chains and Solana, take a look ChainId And ChainName Configs​
Init

Login

create a Login function in the Widget Blueprint, and then complete its parameters.
  • Preferred Auth Type: optional, you can pass "phone" / "email" / "jwt" , or empty
  • Account: optional, you can pass phone number (E.164) / email address / json web token, or empty.
  • OnLoginEvent: Json string, When user login succeed, user info will be returned as event data,including user uuid, token, wallet info and so on, you should persistent the user info data by yourself.
Login

Sign message

create a SignMessage function in the Widget Blueprint, and then complete its parameters.
  1. 1.
    Message: the message to be signed by Particle Auth Service. in evm, request utf8 string, like "hello world", in solana, request base58 string.
  2. 2.
    OnSignMessageEvent: Json string, when user confirmed signing the message in Particle Auth Service, a result will be return as event data, it should contain error or signature.
Sign message

Sign and send transaction

create a SignAndSendTransaction function in the Widget Blueprint, and then complete its parameters.
  1. 1.
    Transaction: the transaction to be signed by Particle Auth Service. in evm, request utf8 json string, in solana, request base58 string.
  2. 2.
    MakeEvmTransaction: is a helper method to create a evm transaction, also you can create by yourself, then serilized to json string.
  3. 3.
    OnSignAndSendTransactionEvent: Json string, when user confirmed signing the transaction in Particle Auth Service, a result will be return as event data, it should contain error or signature.
Sign and send transaction

Sign typed data

only support evm, create a SignTypedData function in the Widget Blueprint, and then complete its parameters.
  1. 1.
    Message: the message to be signed by Particle Auth Service. in evm, request utf8 json string
  2. 2.
    Version: we support v1, v3, v4, default is v4.
  3. 3.
    OnSignTypedDataEvent: Json string, when user confirmed signing the message in Particle Auth Service, a result will be return as event data, it should contain error or signature.
Sign typed data

Sign transaction

only support solana, create a SignTransaction function in the Widget Blueprint, and then complete its parameters.
  1. 1.
    Transaction: the transaction to be signed by Particle Auth Service. request base58 string
  2. 2.
    OnSignTransactionEvent: Json string, when user confirmed signing the message in Particle Auth Service, a result will be return as event data, it should contain error or signature.
Sign transaction

Sign all transactions

only support solana, create a SignAllTransactions function in the Widget Blueprint, and then complete its parameters.
  1. 1.
    Transactions: the transactions to be signed by Particle Auth Service. request base58 string array.
  2. 2.
    OnSignAllTransactionsEvent: Json string, when user confirmed signing the message in Particle Auth Service, a result will be return as event data, it should contain error or signature.
Sign all transaction