Skip to content

Commit fb5115a

Browse files
committed
[Docs] Unity as of 5.7.0 (#5195)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on updating the documentation for the `Unity SDK`, including changes to wallet options, sidebar navigation, and the introduction of build instructions. It also replaces an image and adds new sections for configuration and debugging. ### Detailed summary - Removed `thirdwebmanager.png` and updated image imports. - Changed title in `page.mdx` from "Unity SDK (v5)" to "Unity SDK". - Expanded wallet options to include `Github` and `Twitch`. - Added new `Build Instructions` section in `page.mdx`. - Updated sidebar to include `Build Instructions` and `Migrate from v4`. - Revised `Client Settings` and added `Preferences`, `Misc`, and `Debug` sections. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent a5ffc54 commit fb5115a

File tree

13 files changed

+95
-17
lines changed

13 files changed

+95
-17
lines changed

apps/portal/src/app/dotnet/wallets/providers/ecosystem-wallet/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Create an instance of `EcosystemWallet` using a user's email, phone number or OA
1515
Ecosystem Wallets support a variety of login methods:
1616
- Email (OTP Login)
1717
- Phone (OTP Login)
18-
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.)
18+
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.)
1919
- SIWE (Sign-In with Ethereum)
2020
- Custom Auth (OIDC Compatible)
2121
- Custom Auth (Generic Auth Endpoint)

apps/portal/src/app/dotnet/wallets/providers/in-app-wallet/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Create an instance of `InAppWallet` using a user's email, phone number or OAuth.
1515
In-App Wallets support a variety of login methods:
1616
- Email (OTP Login)
1717
- Phone (OTP Login)
18-
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.)
18+
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.)
1919
- SIWE (Sign-In with Ethereum)
2020
- Custom Auth (OIDC Compatible)
2121
- Custom Auth (Generic Auth Endpoint)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { Callout, createMetadata } from "@doc";
2+
3+
export const metadata = createMetadata({
4+
title: "Unity SDK v5 Build Instructions | thirdweb Unity SDK",
5+
description:
6+
"Learn how to build your Unity project with the thirdweb Unity SDK.",
7+
});
8+
9+
# Build Instructions
10+
11+
## General
12+
13+
- **Build Settings:** Use `Smaller (faster) Builds` / `Shorter Build Time`.
14+
- **Player Settings:** Use IL2CPP over Mono when available.
15+
- **Stripping Level:** Set `Managed Stripping Level` to `Minimal` (`Player Settings` > `Other Settings` > `Optimization`). (Generally not a hard requirement unless using WalletConnect as a wallet provider option.)
16+
17+
## WebGL
18+
19+
- **WebGL Template:** None enforced, feel free to customize!
20+
- **Compression Format:** Set to `Disabled` (`Player Settings` > `Publishing Settings`) for final builds.
21+
- **Testing WebGL Social Login Locally:** Host the build or run it locally with `Cross-Origin-Opener-Policy` set to `same-origin-allow-popups`.
22+
23+
Example setup for testing In-App or Ecosystem Wallet Social Login locally:
24+
25+
```javascript
26+
// YourWebGLOutputFolder/server.js
27+
const express = require("express");
28+
const app = express();
29+
const port = 8000;
30+
31+
app.use((req, res, next) => {
32+
res.header("Cross-Origin-Opener-Policy", "same-origin-allow-popups");
33+
next();
34+
});
35+
36+
app.use(express.static("."));
37+
app.listen(port, () =>
38+
console.log(`Server running on http://localhost:${port}`),
39+
);
40+
41+
// run it with `node server.js`
42+
```
43+
44+
No action needed for hosted builds.
45+
46+
## Mobile
47+
48+
- **EDM4U:** Comes with the package, resolves dependencies at runtime. Use `Force Resolve` from `Assets` > `External Dependency Manager` > `Android Resolver`.
49+
- **Redirect Schemes:** Set custom schemes matching your bundle ID in `Plugins/AndroidManifest.xml` or equivalent to ensure OAuth redirects.

apps/portal/src/app/unity/v5/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { OpenSourceCard, ArticleIconCard, ArticleCard, Grid } from "@doc";
22
import { GraduationCap } from "lucide-react";
33

4-
# Unity SDK (v5)
4+
# Unity SDK
55

66
The best Unity SDK to build cross-platform games on any EVM blockchain.
77

apps/portal/src/app/unity/v5/sidebar.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ export const sidebar: SideBar = {
1212
name: "Overview",
1313
href: sdkSlug,
1414
},
15-
{
16-
name: "Migration Guide",
17-
href: `${sdkSlug}/migration-guide`,
18-
},
1915
{
2016
name: "Getting Started",
2117
href: `${sdkSlug}/getting-started`,
@@ -29,6 +25,10 @@ export const sidebar: SideBar = {
2925
name: "Thirdweb Manager",
3026
href: `${sdkSlug}/thirdwebmanager`,
3127
},
28+
{
29+
name: "Build Instructions",
30+
href: `${sdkSlug}/build-instructions`,
31+
},
3232
],
3333
},
3434
{
@@ -80,6 +80,10 @@ export const sidebar: SideBar = {
8080
href: `${sdkSlug}/contracts`,
8181
},
8282
{ separator: true },
83+
{
84+
name: "Migrate from v4",
85+
href: `${sdkSlug}/migration-guide`,
86+
},
8387
{
8488
name: ".NET SDK Portal",
8589
href: "/dotnet",

apps/portal/src/app/unity/v5/thirdwebmanager/page.mdx

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
import { DocImage, createMetadata } from "@doc";
3-
import thirdwebManager from "./thirdwebmanager.png";
3+
import thirdwebmanager_client from "./thirdwebmanager_client.png";
4+
import thirdwebmanager_preferences from "./thirdwebmanager_preferences.png";
5+
import thirdwebmanager_misc from "./thirdwebmanager_misc.png";
6+
import thirdwebmanager_debug from "./thirdwebmanager_debug.png";
47

58
export const metadata = createMetadata({
69
title: "Thirdweb Manager | thirdweb Unity SDK",
@@ -15,35 +18,57 @@ Add the prefab to your scene and the client will persist throughout your game's
1518

1619
It is entirely optional, and you can opt to use the [.NET SDK](/dotnet) directly if you prefer to do so.
1720

18-
<DocImage src={thirdwebManager} className="w-[600px]" />
21+
If you are wrapping the SDK, we recommend making your own Manager inspired by `ThirdwebManager.cs`, specifically for `ThirdwebClient` initialization.
1922

2023
## Configuration
2124

2225
Configure `ThirdwebManager` through the Unity Inspector window.
2326

2427
Below is a list of all the settings you can adjust.
2528

26-
### Client Settings
29+
### Client
2730

28-
This section involves the basic settings to configure the SDK:
31+
<DocImage src={thirdwebmanager_client} />
32+
33+
This section involves the required thirdweb client settings to configure the SDK:
2934

3035
- `Client ID`: Thirdweb [API Key](https://thirdweb.com/create-api-key). Used to access thirdweb services such as RPC, Storage, and Account Abstraction.
3136
- `Bundle ID`: The bundle ID used to access thirdweb services from native platforms. Should be the same as the bundle ID in your Unity project, e.g., `com.companyname.gamename`.
37+
- `Create API Key`: A link to create a new API key if you don't have one.
38+
39+
### Preferences
40+
41+
<DocImage src={thirdwebmanager_preferences} />
42+
43+
This section allows you to define the default preferences for the SDK:
44+
3245
- `Initialize On Awake`: Whether the SDK should initialize on awake or not. If not, you can call `ThirdwebManager.Instance.Initialize()` to initialize it manually.
3346
- `Show Debug Logs`: Whether to show thirdweb SDK debug logs.
3447
- `Opt Out Usage Analytics`: Whether to opt out of Connect usage analytics, such as the number of wallets connected to your game.
3548

36-
### WalletConnect Settings
49+
### Misc
50+
51+
<DocImage src={thirdwebmanager_misc} />
52+
53+
This section allows you to customize the SDK's behavior:
54+
55+
- `Supported Chains`: A list of chains that the wallets should be able to connect to by default when using `WalletConnect` as a wallet provider.
56+
- `Redirect Page HTML Override`: Raw HTML to override the default redirect page when connecting to `InAppWallet` or `EcosystemWallet` providers.
57+
58+
### Debug
59+
60+
<DocImage src={thirdwebmanager_debug} />
3761

38-
This section allows you to define WalletConnect-specific settings:
62+
This section allows you to find helpful information:
3963

40-
- `Supported Chains`: A list of chains that the wallets should be able to connect to by default. Each chain is defined by a chain ID.
64+
- `Log Active Wallet Info`: Logs the active (last connected) wallet's information such as its address.
65+
- `Open Documentation`: Opens the thirdweb SDK documentation in your default browser.
4166

4267
## Interacting with the ThirdwebManager
4368

4469
Once your `ThirdwebManager` is set up, you can interact with it using the following methods:
4570

46-
### Initialize
71+
### Initialize (If not set to `Initialize On Awake`)
4772

4873
```csharp
4974
ThirdwebManager.Instance.Initialize();
Binary file not shown.
Loading
Loading
Loading

0 commit comments

Comments
 (0)