Unity Setup
This guide explains how to configure a Unity Web3 app and allow users to sign blockchain transactions using the Arcana wallet.
Use the Arcana Developer Dashboard to first configure user onboarding settings for the Unity app and then integrate the app with the Arcana Auth Unity SDK.
Prerequisites
-
To use the Arcana Developer Dashboard, developers can sign in using one of the supported social login providers or opt for passwordless sign-in.
- GitHub
- Twitch
- Discord
Go to https://dashboard.arcana.network and log in using one of the available options.
Aggregate Login
The Arcana Auth protocol aggregates multiple login identities for the user across social login providers under a single identifiable Arcana account. This enables developers to log into the Arcana Developer Dashboard through any of the supported login providers and access the same Arcana developer account and app settings.
Register App
To register a Web3 Unity app, log into the Arcana Developer Dashboard, create a new app and select the chain that must show up as the default chain in the wallet.
See how to register a new App for details.
Configure App
Refer to the Arcana Developer Dashboard User's Guide and configure the branding, social authentication providers and other settings.
Unity Settings, SDK Installation
-
Install NuGetForUnity.
-
In the NuGet Toolbar at the top, click NuGet > Manage NuGet packages.
-
Install the following packages by STA:
Nethereum.Web3
,WebsocketSharp.Core
-
Use the Unity Editor Project Settings window to edit package settings for your project. Click Edit > Project Settings > Package Manager.
-
Edit Project Settings with URL https://npm-registry.arcana.network/ and set the scope to
com.cysharp.unitask, dev.voltstro
-
Add another new scoped registry with URL https://unitynuget-registry.azurewebsites.net and set the scope to
org.nuget
.
-
-
In the NuGet window, use the NuGet Toolbar at the top, and click Window > Package Manager > Add Package by Name.
-
Add the following packages:
com.cysharp.unitask
,`dev.voltstro.unitywebbrowser.engine.cef
-
Windows:
dev.voltstro.unitywebbrowser.engine.cef.win.x64
-
Linux:
dev.voltstro.unitywebbrowser.engine.cef.linux.x64
-
MacOS:
dev.voltstro.unitywebbrowser.engine.cef.macos.x64
-
See Unity Web Browser package list for details.
-
Download the Arcana Auth Unity SDK package: https://npm-registry.arcana.network/. Unzip the contents and copy them to the Assets folder of the Unity Project.
-
Search for ArcanaSDK prefab in the 'Project Window' of the Unity Editor. Click Assets > ArcanaSDK > Prefabs > ArcanaSDK. Drag this prefab into the project 'Hierarchy' and configure the prefab as shown here:
Next Steps
After integrating an app with the Arcana Auth Unity SDK, developers can add code to onboard users and enable Web3 wallet operations for authenticated users to sign transactions.
See Also
- 'Unity' integration example:
sample-auth-unity
submodule in Auth Examples - Arcana Developer Dashboard User Guide
- Configuring Arcana wallet visibility
- Developer's Guide for Arcana wallet
- Handling Arcana Auth SDK error messages
- Arcana Auth SDK Usage Guide
- Arcana Auth SDK Reference Guide
- Arcana Auth Wagmi SDK Reference Guide
- Arcana Auth Flutter SDK Reference Guide
- Enabling Gasless Operations in an App
- Arcana Gasless (Standalone) SDK Quick Start Guide
- Arcana Gasless (Standalone) SDK Usage Guide
- Gasless Error Messages