Unity
With AppKit, you can easily let people interact with multiple EVM compatible wallets and blockchains.
Install
Let's get started by installing the package!
Prerequisites
- Unity 2022.3 or above
- IL2CPP code stripping level: Minimal (or lower)
- Target platform: Android, iOS, Windows, macOS, WebGL
- Gamma color space
- If you need Linear color space, please open a GitHub issue
Package
- OpenUPM CLI
- Package Manager with OpenUPM
To install packages via OpenUPM, you need to have Node.js and openupm-cli installed. Once you have them installed, you can run the following commands:
openupm add com.reown.appkit.unity
- Open
Advanced Project Settings
from the gear ⚙ menu located at the top right of the Package Manager’s toolbar - Add a new scoped registry with the following details:
- Name:
OpenUPM
- URL:
https://package.openupm.com
- Scope(s):
com.reown
andcom.nethereum
- Name:
- Press plus ➕ and then
Save
buttons - In the Package Manager windows open the add ➕ menu from the toolbar
- Select
Add package by name...
- Enter the names of the following packages one by one:
- `com.nethereum.unity
com.reown.core
com.reown.core.crypto
com.reown.core.common
com.reown.core.network
com.reown.core.storage
com.reown.sign
com.reown.sign.unity
com.reown.sign.nethereum
com.reown.sign.nethereum.unity
com.reown.appkit.unity
- Press
Add
button
Configure
The minimum configuration required is filling in a Project ID
and Metadata
fields inside of AppKitConfig
.
Don't have a project ID?
Head over to Reown Cloud and create a new project now!
await AppKit.InitializeAsync(
new AppKitConfig(
projectId: "YOUR PROJECT ID",
new Metadata(
name: "My Game",
description: "Short description
url: "https://example.com",
iconUrl: "https://example.com/logo.png"
)
)
);
- projectId: The project ID is a unique identifier for your project.
- If you don’t have a Project ID, you can create one at Reown Cloud.
- name: The project name is a human-readable name for your project.
- description: The project description is a human-readable description for your project.
- url: The project URL
- iconUrl: Icon of the project.
Implement
- Add
Reown AppKit
prefab fromPackages/AppKit/Prefabs
to your scene. - Initialize AppKit from your script
public async void Start()
{
var config = new AppKitConfig(...);
await AppKit.InitializeAsync(config);
}
- Open the modal
public void OpenAppKitModal()
{
AppKit.OpenModal();
}
Examples and Test dApps
Getting Support 🙋
Reown is committed to delivering the best developer experience.
If you have any questions, feature requests, or bug reports, feel free to open an issue on GitHub!