Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LYNC-Unity-AA-WebGL

LYNC AA SDK is a no-code Unity SDK allowing seamless integration of Account Abstraction. Supported Platforms: WebGL (Browser Games)

Download the SDK

Download the SDK: https://github.com/LYNC-WORLD/LYNC-Unity-AA/releases/

Get your API Key

Please get your API key before downloading the SDK from here

Installation

Import the SDK .unitypackage file to your project. or simply drag and drop the .unitypackage file to your project.

image

Once the Account Abstraction SDK package has finished importing into your Unity project, you can begin integrating it into your game. The Folder structure looks like this

Screenshot 2023-11-28 at 5 58 24 PM

Integrating AA SDK in Unity

There are 2 Example Projects present in the SDK: Assets -> LYNC-AA-WEBGL -> Example / Example-2

Screenshot 2023-11-28 at 6 00 09 PM

You can find the example scene in the folders. Simply pass the API key in lyncManager GameObject. To test, Build and Run after adding this scene in (Scene in Build).

Screenshot 2023-11-28 at 6 01 39 PM

Setup the Project

To use, LYNC Manager Prefab, it needs to be attached to the first scene. This will serve as the starting point for your project. In LYNC Manager Prefab, be sure to provide the following details:

  1. LYNC API Key (The API Key can be generated from here)
  2. Choose chain
  3. Pass in the Dapp API Key (The API key can be generated from the Biconomy Dashboard)
  4. Web3 Auth Client ID (The API key can be generated from the Web3 Auth Dashboard)

Once done, You can attach the Login Example Script in your Scene by dragging and dropping a Button as a Game Object

Screenshot 2023-11-28 at 6 45 41 PM

To Login with Code:

using LYNC;
using LYNC.Wallet;

LyncManager.Instance.walletAuth.ConnectWallet(
  wallet =>
  {
      Debug.Log("EOA Address: "+walletData.PublicAddress);
      Debug.Log("Smart Account Address: "+walletData.SmartAccount);
  },
  error =>
  {
    Debug.LogError(error);
  }
);

About

LYNC Unity Account Abstraction SDK for WebGL.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages