Skip to content

Commit e0f7df7

Browse files
Update setup instructions for Unity SDK (#85)
1 parent 1164ea4 commit e0f7df7

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

sdk/unity/installation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ title: Installation
2323
3. Import "Setup" from Samples
2424
![Setup](/images/unity/unity-import-setup.png)
2525

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

2828
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.
2929

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

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

44-
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.
44+
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.
4545

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

sdk/unity/quickstart.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ and use the following Git URL `https://github.com/0xsequence/sequence-unity.git?
1414
Sign in and create a project on [Sequence Builder](https://sequence.build).
1515

1616
Download your config file from Builder as shown below.
17-
18-
Alternatively, get your `Project Access Key` and `WaaS Configuration Key` from `Onboard > Embedded Wallet`,
19-
and add them to your [Project's Sequence Config File](/sdk/unity/setup).
2017
<Frame>
2118
<img src="/images/unity/builder_config_file.png" />
2219
</Frame>
20+
21+
Place this file in the root of a `Resources` folder.
2322
</Step>
2423
<Step title="Integrate your Login Process">
2524
Start by establishing a wallet session using an email OTP. Import the `Setup` Sample from the Package Manager UI

sdk/unity/setup.mdx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,18 @@ description: Documentation for Unity SDK setup for the Sequence infrastructure s
44
---
55

66
# Setup
7-
8-
1. Navigate to the Resources folder imported via the `Setup` sample and locate the `SequenceConfig` ScriptableObject
9-
10-
a) If you imported the SDK manually, you will need to create a Resources folder and SequenceConfig
11-
12-
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.
7+
1. [Configure your Embedded Wallet](/sdk/headless-wallet/quickstart) in the Sequence Builder
8+
2. Download the Unity configuration ScriptableObject `SequenceConfig.asset` from the Builder UI
9+
<Frame>
10+
<img src="/images/unity/builder_config_file.png" />
11+
</Frame>
12+
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:
1313

14-
c) On the top bar, click `Assets > Create > Sequence > SequenceConfig` and place the newly created `ScriptableObject` at the root of your `Resources` folder.
15-
2. Fill in `SequenceConfig` with the appropriate values for your project.
16-
1714
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.
1815

19-
b) `Builder API Keys` - These are found in the [Sequence Builder](https://sequence.build/) under `Settings > API Keys`
20-
21-
c) `WaaS Config Key` - You can get this key in [Sequence Builder](https://sequence.build/) under `Onboard > Embedded Wallet`
22-
23-
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.
16+
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.
2417

25-
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.
18+
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.
2619

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

0 commit comments

Comments
 (0)