Skip to content

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.

    • Google
    • GitHub
    • Twitch
    • Discord

Go to https://dashboard.arcana.network and log in using one of the available options.

Welcome screen
Developer Dashboard Login Page

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.

    Manage NuGet Packages
    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

      Pkg Manager 1
      Edit Project Settings

    • Add another new scoped registry with URL https://unitynuget-registry.azurewebsites.net and set the scope to org.nuget.

      Add Scoped Registry
      Add Scoped Registry

  • In the NuGet window, use the NuGet Toolbar at the top, and click Window > Package Manager > Add Package by Name.

    Add Package by Name
    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:

    Configure Arcana Prefab
    Configure Arcana Prefab

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


Last update: April 12, 2024 by shaloo