Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/unity/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ title: Installation
3. Import "Setup" from Samples
![Setup](/images/unity/unity-import-setup.png)

a) This will import a Resources folder with the SequenceConfig scriptable object (more on this in Setup).
a) This will import a Resources folder with some boilerplate UI prefabs for you to use in your project.

4. Import `TMP Essentials` (if you haven't already). Note: Unity should prompt you to do this automatically if you attempt to Play or Build with a TextMeshPro object in your scene.

Expand All @@ -41,7 +41,7 @@ These can be found by:

![Samples](/images/unity/unity-package-manager-samples.png)

The second sample "Demo Scene" is sample scene that showcases some of the features of our SDK. It serves as a useful supplement to the documentation.
The second sample "Demo Scene" is sample scene that showcases some of the features of our SDK. It serves as a useful supplement to the documentation. Note that you will need to import `Setup` in order for this demo to work properly.

The third sample "Useful Scripts" contains useful scripts and Prefabs that make integrating the SDK easier.

Expand Down
5 changes: 2 additions & 3 deletions sdk/unity/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ and use the following Git URL `https://github.com/0xsequence/sequence-unity.git?
Sign in and create a project on [Sequence Builder](https://sequence.build).

Download your config file from Builder as shown below.

Alternatively, get your `Project Access Key` and `WaaS Configuration Key` from `Onboard > Embedded Wallet`,
and add them to your [Project's Sequence Config File](/sdk/unity/setup).
<Frame>
<img src="/images/unity/builder_config_file.png" />
</Frame>

Place this file in the root of a `Resources` folder.
</Step>
<Step title="Integrate your Login Process">
Start by establishing a wallet session using an email OTP. Import the `Setup` Sample from the Package Manager UI
Expand Down
23 changes: 8 additions & 15 deletions sdk/unity/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@ description: Documentation for Unity SDK setup for the Sequence infrastructure s
---

# Setup

1. Navigate to the Resources folder imported via the `Setup` sample and locate the `SequenceConfig` ScriptableObject
a) If you imported the SDK manually, you will need to create a Resources folder and SequenceConfig

b) Create a `Resources` folder located at `Assets/Resources`. The SDK uses [Resources.Load](https://docs.unity3d.com/ScriptReference/Resources.Load.html) to load the config `ScriptableObject` we'll create in the next step.
1. [Configure your Embedded Wallet](/sdk/headless-wallet/quickstart) in the Sequence Builder
2. Download the Unity configuration ScriptableObject `SequenceConfig.asset` from the Builder UI
<Frame>
<img src="/images/unity/builder_config_file.png" />
</Frame>
3. Place your newly downloaded `SequenceConfig.asset` ScriptableObject in the root of a Resources folder. It will be loaded using [Resources.Load](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Resources.Load.html). Double check your config values, namely:

c) On the top bar, click `Assets > Create > Sequence > SequenceConfig` and place the newly created `ScriptableObject` at the root of your `Resources` folder.
2. Fill in `SequenceConfig` with the appropriate values for your project.

a) `Url Scheme` - You must replace this with a string that is unique to your application. This is very important. Failure to do so will cause unexpected behaviour when signing in with social sign in and it will not work.

b) `Builder API Keys` - These are found in the [Sequence Builder](https://sequence.build/) under `Settings > API Keys`

c) `WaaS Config Key` - You can get this key in [Sequence Builder](https://sequence.build/) under `Onboard > Embedded Wallet`

d) `StoreSessionPrivateKeyInSecureStorage` - Available on select platforms: we have integrated with the platform's native secure storage system. If enabled, we will store session wallet info (including the private key) in secure storage and automatically attempt to recover the session for the user after closing the app (so they won't need to login again). With this disabled (default) or on an unsupported platform, the session wallet's private keys never leave the application's runtime memory; however, your user will need to sign in again anytime they close the app. The default `LoginPanel` UI (see [Recovering Sessions](/sdk/unity/onboard/recovering-sessions)) will handle this behaviour for you automatically, navigating to the appropriate page.
b) `StoreSessionPrivateKeyInSecureStorage` - Available on select platforms: we have integrated with the platform's native secure storage system. If enabled, we will store session wallet info (including the private key) in secure storage and automatically attempt to recover the session for the user after closing the app (so they won't need to login again). With this disabled (default) or on an unsupported platform, the session wallet's private keys never leave the application's runtime memory; however, your user will need to sign in again anytime they close the app. The default `LoginPanel` UI (see [Recovering Sessions](/sdk/unity/onboard/recovering-sessions)) will handle this behaviour for you automatically, navigating to the appropriate page.

e) `EnableMultipleAccountsPerEmail` - By default, the SDK will only allow users to create one account per email. The account is initially associated with the login method used (email + OTP, PlayFab, Google, etc.); the user can associate additional login methods with their account (more on this in the [Authentication section](/sdk/unity/onboard/authentication/federated-accounts)). If `EnableMultipleAccountsPerEmail` is enabled, users have the option to create multiple accounts per email address (associated with different login methods). While we have enabled this functionality, we, in general, feel this behaviour may be confusing to end-users and recommend integrators keep this option in the default disabled status.
c) `EnableMultipleAccountsPerEmail` - By default, the SDK will only allow users to create one account per email. The account is initially associated with the login method used (email + OTP, PlayFab, Google, etc.); the user can associate additional login methods with their account (more on this in the [Authentication section](/sdk/unity/onboard/authentication/federated-accounts)). If `EnableMultipleAccountsPerEmail` is enabled, users have the option to create multiple accounts per email address (associated with different login methods). While we have enabled this functionality, we, in general, feel this behaviour may be confusing to end-users and recommend integrators keep this option in the default disabled status.

<Warning>Before proceeding, please make sure you have properly configured the Embedded Wallet in the Builder. See this [guide](/sdk/headless-wallet/quickstart).</Warning>

Expand Down