diff --git a/apps/portal/src/app/dotnet/wallets/providers/ecosystem-wallet/page.mdx b/apps/portal/src/app/dotnet/wallets/providers/ecosystem-wallet/page.mdx index 198da1614aa..87e3616d00c 100644 --- a/apps/portal/src/app/dotnet/wallets/providers/ecosystem-wallet/page.mdx +++ b/apps/portal/src/app/dotnet/wallets/providers/ecosystem-wallet/page.mdx @@ -15,7 +15,7 @@ Create an instance of `EcosystemWallet` using a user's email, phone number or OA Ecosystem Wallets support a variety of login methods: - Email (OTP Login) - Phone (OTP Login) -- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.) +- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.) - SIWE (Sign-In with Ethereum) - Custom Auth (OIDC Compatible) - Custom Auth (Generic Auth Endpoint) diff --git a/apps/portal/src/app/dotnet/wallets/providers/in-app-wallet/page.mdx b/apps/portal/src/app/dotnet/wallets/providers/in-app-wallet/page.mdx index efaaca8c7d8..22d7d28dd14 100644 --- a/apps/portal/src/app/dotnet/wallets/providers/in-app-wallet/page.mdx +++ b/apps/portal/src/app/dotnet/wallets/providers/in-app-wallet/page.mdx @@ -15,7 +15,7 @@ Create an instance of `InAppWallet` using a user's email, phone number or OAuth. In-App Wallets support a variety of login methods: - Email (OTP Login) - Phone (OTP Login) -- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.) +- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.) - SIWE (Sign-In with Ethereum) - Custom Auth (OIDC Compatible) - Custom Auth (Generic Auth Endpoint) diff --git a/apps/portal/src/app/unity/v5/build-instructions/page.mdx b/apps/portal/src/app/unity/v5/build-instructions/page.mdx new file mode 100644 index 00000000000..5d1e8cbdc10 --- /dev/null +++ b/apps/portal/src/app/unity/v5/build-instructions/page.mdx @@ -0,0 +1,49 @@ +import { Callout, createMetadata } from "@doc"; + +export const metadata = createMetadata({ + title: "Unity SDK v5 Build Instructions | thirdweb Unity SDK", + description: + "Learn how to build your Unity project with the thirdweb Unity SDK.", +}); + +# Build Instructions + +## General + +- **Build Settings:** Use `Smaller (faster) Builds` / `Shorter Build Time`. +- **Player Settings:** Use IL2CPP over Mono when available. +- **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.) + +## WebGL + +- **WebGL Template:** None enforced, feel free to customize! +- **Compression Format:** Set to `Disabled` (`Player Settings` > `Publishing Settings`) for final builds. +- **Testing WebGL Social Login Locally:** Host the build or run it locally with `Cross-Origin-Opener-Policy` set to `same-origin-allow-popups`. + +Example setup for testing In-App or Ecosystem Wallet Social Login locally: + +```javascript +// YourWebGLOutputFolder/server.js +const express = require("express"); +const app = express(); +const port = 8000; + +app.use((req, res, next) => { + res.header("Cross-Origin-Opener-Policy", "same-origin-allow-popups"); + next(); +}); + +app.use(express.static(".")); +app.listen(port, () => + console.log(`Server running on http://localhost:${port}`), +); + +// run it with `node server.js` +``` + +No action needed for hosted builds. + +## Mobile + +- **EDM4U:** Comes with the package, resolves dependencies at runtime. Use `Force Resolve` from `Assets` > `External Dependency Manager` > `Android Resolver`. +- **Redirect Schemes:** Set custom schemes matching your bundle ID in `Plugins/AndroidManifest.xml` or equivalent to ensure OAuth redirects. diff --git a/apps/portal/src/app/unity/v5/page.mdx b/apps/portal/src/app/unity/v5/page.mdx index 9489f4235a2..d65db00304f 100644 --- a/apps/portal/src/app/unity/v5/page.mdx +++ b/apps/portal/src/app/unity/v5/page.mdx @@ -1,7 +1,7 @@ import { OpenSourceCard, ArticleIconCard, ArticleCard, Grid } from "@doc"; import { GraduationCap } from "lucide-react"; -# Unity SDK (v5) +# Unity SDK The best Unity SDK to build cross-platform games on any EVM blockchain. diff --git a/apps/portal/src/app/unity/v5/sidebar.tsx b/apps/portal/src/app/unity/v5/sidebar.tsx index 78c4906b52e..57f798b2b87 100644 --- a/apps/portal/src/app/unity/v5/sidebar.tsx +++ b/apps/portal/src/app/unity/v5/sidebar.tsx @@ -12,10 +12,6 @@ export const sidebar: SideBar = { name: "Overview", href: sdkSlug, }, - { - name: "Migration Guide", - href: `${sdkSlug}/migration-guide`, - }, { name: "Getting Started", href: `${sdkSlug}/getting-started`, @@ -29,6 +25,10 @@ export const sidebar: SideBar = { name: "Thirdweb Manager", href: `${sdkSlug}/thirdwebmanager`, }, + { + name: "Build Instructions", + href: `${sdkSlug}/build-instructions`, + }, ], }, { @@ -80,6 +80,10 @@ export const sidebar: SideBar = { href: `${sdkSlug}/contracts`, }, { separator: true }, + { + name: "Migrate from v4", + href: `${sdkSlug}/migration-guide`, + }, { name: ".NET SDK Portal", href: "/dotnet", diff --git a/apps/portal/src/app/unity/v5/thirdwebmanager/page.mdx b/apps/portal/src/app/unity/v5/thirdwebmanager/page.mdx index d69cd663624..c739dbb7b7f 100644 --- a/apps/portal/src/app/unity/v5/thirdwebmanager/page.mdx +++ b/apps/portal/src/app/unity/v5/thirdwebmanager/page.mdx @@ -1,6 +1,9 @@ import { DocImage, createMetadata } from "@doc"; -import thirdwebManager from "./thirdwebmanager.png"; +import thirdwebmanager_client from "./thirdwebmanager_client.png"; +import thirdwebmanager_preferences from "./thirdwebmanager_preferences.png"; +import thirdwebmanager_misc from "./thirdwebmanager_misc.png"; +import thirdwebmanager_debug from "./thirdwebmanager_debug.png"; export const metadata = createMetadata({ title: "Thirdweb Manager | thirdweb Unity SDK", @@ -15,7 +18,7 @@ Add the prefab to your scene and the client will persist throughout your game's It is entirely optional, and you can opt to use the [.NET SDK](/dotnet) directly if you prefer to do so. - +If you are wrapping the SDK, we recommend making your own Manager inspired by `ThirdwebManager.cs`, specifically for `ThirdwebClient` initialization. ## Configuration @@ -23,27 +26,49 @@ Configure `ThirdwebManager` through the Unity Inspector window. Below is a list of all the settings you can adjust. -### Client Settings +### Client -This section involves the basic settings to configure the SDK: + + +This section involves the required thirdweb client settings to configure the SDK: - `Client ID`: Thirdweb [API Key](https://thirdweb.com/create-api-key). Used to access thirdweb services such as RPC, Storage, and Account Abstraction. - `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`. +- `Create API Key`: A link to create a new API key if you don't have one. + +### Preferences + + + +This section allows you to define the default preferences for the SDK: + - `Initialize On Awake`: Whether the SDK should initialize on awake or not. If not, you can call `ThirdwebManager.Instance.Initialize()` to initialize it manually. - `Show Debug Logs`: Whether to show thirdweb SDK debug logs. - `Opt Out Usage Analytics`: Whether to opt out of Connect usage analytics, such as the number of wallets connected to your game. -### WalletConnect Settings +### Misc + + + +This section allows you to customize the SDK's behavior: + +- `Supported Chains`: A list of chains that the wallets should be able to connect to by default when using `WalletConnect` as a wallet provider. +- `Redirect Page HTML Override`: Raw HTML to override the default redirect page when connecting to `InAppWallet` or `EcosystemWallet` providers. + +### Debug + + -This section allows you to define WalletConnect-specific settings: +This section allows you to find helpful information: -- `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. +- `Log Active Wallet Info`: Logs the active (last connected) wallet's information such as its address. +- `Open Documentation`: Opens the thirdweb SDK documentation in your default browser. ## Interacting with the ThirdwebManager Once your `ThirdwebManager` is set up, you can interact with it using the following methods: -### Initialize +### Initialize (If not set to `Initialize On Awake`) ```csharp ThirdwebManager.Instance.Initialize(); diff --git a/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager.png b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager.png deleted file mode 100644 index 71baaba6516..00000000000 Binary files a/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager.png and /dev/null differ diff --git a/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_client.png b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_client.png new file mode 100644 index 00000000000..4b987ba073a Binary files /dev/null and b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_client.png differ diff --git a/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_debug.png b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_debug.png new file mode 100644 index 00000000000..1c5599683a3 Binary files /dev/null and b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_debug.png differ diff --git a/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_misc.png b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_misc.png new file mode 100644 index 00000000000..a46d1770537 Binary files /dev/null and b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_misc.png differ diff --git a/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_preferences.png b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_preferences.png new file mode 100644 index 00000000000..333dcecbbb0 Binary files /dev/null and b/apps/portal/src/app/unity/v5/thirdwebmanager/thirdwebmanager_preferences.png differ diff --git a/apps/portal/src/app/unity/v5/wallets/ecosystem-wallet/page.mdx b/apps/portal/src/app/unity/v5/wallets/ecosystem-wallet/page.mdx index d1d4085fa82..751e5df4bf9 100644 --- a/apps/portal/src/app/unity/v5/wallets/ecosystem-wallet/page.mdx +++ b/apps/portal/src/app/unity/v5/wallets/ecosystem-wallet/page.mdx @@ -20,7 +20,7 @@ Ecosystem Wallets have a very similar API to the [In-App Wallet](/unity/v5/walle Ecosystem Wallets support a variety of login methods: - Email (OTP Login) - Phone (OTP Login) -- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.) +- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.) - SIWE (Sign-In with Ethereum) - Custom Auth (OIDC Compatible) - Custom Auth (Generic Auth Endpoint) diff --git a/apps/portal/src/app/unity/v5/wallets/in-app-wallet/page.mdx b/apps/portal/src/app/unity/v5/wallets/in-app-wallet/page.mdx index c34b1d9f1cb..6f06232b9eb 100644 --- a/apps/portal/src/app/unity/v5/wallets/in-app-wallet/page.mdx +++ b/apps/portal/src/app/unity/v5/wallets/in-app-wallet/page.mdx @@ -18,7 +18,7 @@ It makes for a fantastic [SmartWallet](/unity/v5/wallets/account-abstraction) ad In-App Wallets support a variety of login methods: - Email (OTP Login) - Phone (OTP Login) -- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.) +- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.) - SIWE (Sign-In with Ethereum) - Custom Auth (OIDC Compatible) - Custom Auth (Generic Auth Endpoint)