WAX Unity Web3 Suite
AuthenticatorLibrary
AuthenticatorLibrary
  • Getting Started
  • Installation
    • WebGL Insatallation
  • Examples
    • Getting Started
      • Canvas Example
      • UIToolkit Example
    • User Data
    • Token Transfer
    • Transact
  • API Docs
    • Canvas
      • UnityCanvasUAL
    • UiToolkit
      • UnityUiToolkitUAL
      • AuthenticatorButtonItem
      • AuthenticatorsPanel
      • BasicControl
      • ScreenBase
      • Utils
    • Authenticators
      • Anchor
        • AnchorAuthenticator
        • AnchorUser
        • AnchorWalletConfig
      • WaxCloudWallet
        • WaxCloudWalletAuthenticator
        • WaxCloudWalletConfig
        • WaxCloudWalletUser
    • Authenticator
    • User
    • AuthenticatorResponse
    • ButtonStyle
    • Chain
    • Utils
    • RpcEndpoint
    • SignTransactionResponse
    • UALOptions
    • UalConstants
    • UalError
    • UnityUAL
Powered by GitBook
On this page
Edit on GitHub
  1. Examples
  2. Getting Started

Canvas Example

PreviousGetting StartedNextUIToolkit Example

Last updated 2 years ago

  1. In a Unity scene, add the Canvas authenticator handler prefab i.e. .

  2. Add the specific that will be used e.g. or as prefabs to the scene and specify them in the handler that was added in Step 1.

  3. Create a new script inheriting from MonoBehaviour, add a public member of type UnityCanvasUAL and assign it in the editor.

  4. In the Start-method, instantiate/initialize the handler prefab added above and add an action when the user login is successful.

N.B. Ensure that you assign an event handler/callback for the login ( UnityCanvasUAL.OnUserLogin += MyLoginCallback;) to get the User object. Click for more information.

Canvas

   UnityCanvasUAL.OnUserLogin += UserLogin;
   await UnityCanvasUAL.Init();
Canvas
authenticators
AnchorWallet
WAX Cloud Wallet
here
Page cover image