# Canvas Example

1. In a Unity scene, add the Canvas authenticator handler prefab i.e. [Canvas](https://github.com/liquiidio/UniversalAuthenticatorLibrarySharp/blob/upm_full/Src/Canvas/Prefabs/UnityCanvasUAL.prefab).
2. Add the specific [authenticators](https://github.com/liquiidio/UniversalAuthenticatorLibrarySharp/tree/upm_full/Src/Authenticators) that will be used e.g. [AnchorWallet](https://github.com/liquiidio/UniversalAuthenticatorLibrarySharp/tree/upm_full/Src/Authenticators/Anchor/Prefabs) or [WAX Cloud Wallet](https://github.com/liquiidio/UniversalAuthenticatorLibrarySharp/tree/upm_full/Src/Authenticators/WaxCloudWallet/Prefabs) 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** [**here**](https://liquiidio.gitbook.io/unity-plugin-suite/v/universalauthenticatorlibrary/examples/example_b) **for more information.**

#### Canvas

```csharp
   UnityCanvasUAL.OnUserLogin += UserLogin;
   await UnityCanvasUAL.Init();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://liquiidio.gitbook.io/unity-plugin-suite/universalauthenticatorlibrary/examples/examples_getting_started/canvas_example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
