Skip to content

Commit b337dd3

Browse files
authored
Update README.md
Signed-off-by: Firekeeper <[email protected]>
1 parent 7306743 commit b337dd3

File tree

1 file changed

+45
-54
lines changed

1 file changed

+45
-54
lines changed

README.md

Lines changed: 45 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,112 +4,103 @@
44
[<img alt=".NET Documentation" src="https://img.shields.io/badge/.NET-Documentation-purple?logo=dotnet&style=for-the-badge" height="30">](https://portal.thirdweb.com/dotnet)
55

66
<div style="border-left: 4px solid #f0ad4e; padding: 10px; background-color: #fcf8e3;">
7-
<strong>⚠️ Note: Work in Progress</strong>
7+
<strong>Note: Active Development</strong>
88
<p>This project is currently under active development. Features, APIs, and behavior may change frequently.</p>
99
</div>
1010

1111
# Technical Demo
1212

13-
Try out our multichain game that leverages In-App Wallets and Account Abstraction to create seamless experiences, built in 3 weeks - [Web3 Warriors](https://web3warriors.thirdweb.com/).
13+
Experience our multichain game demo leveraging In-App and Smart Wallets for seamless gameplay, built in just three weeks - [Web3 Warriors](https://web3warriors.thirdweb.com/).
1414

1515
![image](https://github.com/thirdweb-dev/unity-sdk/assets/43042585/171198b2-83e7-4c8a-951b-79126dd47abb)
1616

1717
# Supported Platforms & Wallets
1818

19-
**Build games for WebGL, Desktop and Mobile using 1000+ supported chains, with various login options!**
19+
**Build games for WebGL, Desktop, and Mobile using 1000+ supported chains, with various login options!**
2020

2121
| Wallet Provider | WebGL | Desktop | Mobile |
2222
| --------------------------------------------- | :-------: | :-------: | :-------: |
23-
| **In-App Wallet** (Email, Social, Phone) | ✔️ | ✔️ | ✔️ |
23+
| **In-App Wallet** (Email, Phone, Socials) | ✔️ | ✔️ | ✔️ |
2424
| **Private Key Wallet** (Guest Mode) | ✔️ | ✔️ | ✔️ |
25-
| **Wallet Connect** | ✔️ | ✔️ | ✔️ |
26-
| **MetaMask (Browser Extension)** | ✔️ |||
27-
| **Smart Wallet** (ERC4337) | ✔️ | ✔️ | ✔️ |
25+
| **Wallet Connect Wallet** (400+ Wallets) | ✔️ | ✔️ | ✔️ |
26+
| **MetaMask Wallet** (Browser Extension) | ✔️ |||
27+
| **Smart Wallet** (Account Abstraction) | ✔️ | ✔️ | ✔️ |
2828

2929
<sub>✔️ Supported</sub> &nbsp; <sub>❌ Not Supported</sub> &nbsp; <sub>— Not Applicable</sub>
3030

3131
# Why Upgrade to v5?
3232

33-
Thirdweb's Unity SDK v5 takes the approach of taking all its core functionality from our robust [.NET SDK](https://portal.thirdweb.com/dotnet).
33+
Thirdweb's Unity SDK v5 leverages the robust [.NET SDK](https://portal.thirdweb.com/dotnet) for core functionality, providing a unified API and behavior across platforms.
3434

35-
It also gets rid of the WebGL Bridge that previously existed, unifying not only APIs, but behaviors and results.
35+
## Key Improvements:
36+
- **Unified API:** Say goodbye to the WebGL Bridge. Now, enjoy a consistent experience across WebGL, Desktop, and Mobile platforms.
37+
- **Enhanced Composability:** Use our SDK anywhere without worrying about its state. APIs are chain agnostic, enabling seamless interaction with multiple chains.
38+
- **Native Experience:** The .NET core provides a native, predictable experience, making upgrades less daunting.
39+
- **Simplified `ThirdwebManager`:**
40+
- `ThirdwebManager.Instance.SDK.GetContract` is now `ThirdwebManager.Instance.GetContract`, returning `ThirdwebContract`.
41+
- `ThirdwebManager.Instance.SDK.Wallet.Connect` is now `ThirdwebManager.Instance.ConnectWallet`, returning `IThirdwebWallet`.
42+
- Handles multiple wallet connections and tracks the active wallet.
43+
- The prefab is now much simpler and straightforward to setup.
44+
- **Optimized Package:** Cleaner, lighter Unity package with minimal dependencies, enhancing performance. We took control of all the layers and rewrote them, further improving the experience when using thirdweb infra. No AWS SDK. Nethereum is used only for types/encoding. Newtonsoft.Json and EDM4U are included.
45+
- **Cross-Platform Consistency:** No behavioral differences between platforms. What you see in the editor is what you get in WebGL, Standalone, and Mobile runtime platforms.
3646

37-
Using the .NET SDK as a core, we unlock that last bit of flexibility that was much needed in v4, and removes all the clutter.
38-
39-
Composability allows you to simply use our SDK anywhere without worrying about the state it is tied to.
40-
41-
Most APIs are chain agnostic, allowing you to create wallets for different chains, interact with contracts on different chains, without having to switch networks or reinitialize the SDK.
42-
43-
Using .NET cross-platform allows for a much more native and predictable experience, and upgrades become a lot less scary to import!
44-
45-
The `ThirdwebManager` is now simply a wrapper simplifying your interaction with the underlying APIs, it preserves familiar APIs from v4:
46-
- `ThirdwebManager.Instance.SDK.GetContract` is now `ThirdwebManager.Instance.GetContract`
47-
- `ThirdwebManager.Instance.SDK.Wallet.Connect` is now `ThirdwebManager.Instance.ConnectWallet`
48-
- The `ThirdwebManager` now can handle multiple wallet connections and tracks the active wallet, you may set it yourself too.
49-
- These functions will return `ThirdwebContract` and `IThirdwebWallet` type objects that have plenty of extensions to play with!
50-
51-
That's really it for the Unity side of things, the rest is all handled internally to bridge the gap between raw .NET and Unity!
52-
- Much cleaner and lighter Unity package.
53-
- The .NET SDK was designed in a composable way while preserving the simple APIs we all know and love.
54-
- Connect to as many wallets as you like in parallel!
55-
- Use different settings for every connection.
56-
- No AWS SDK dependency, Nethereum is now also only used for types, using thirdweb infrastructure is now a much more optimized experience.
57-
- No behavioral differences cross-platform, what you see in the editor is what you get in WebGL, Standalone and Mobile runtime platforms.
47+
## Note:
48+
To achieve full .NET core functionality for WebGL, we include [WebGLThreadingPatcher](https://github.com/VolodymyrBS/WebGLThreadingPatcher), which makes async tasks blocking on the main thread. This is due to Unity's lack of support for C# multithreading in WebGL. This mainly affects InAppWallet initial creation (not session resuming).
5849

5950
# Getting Started
6051

61-
Head over to the [releases](https://github.com/thirdweb-dev/unity-sdk/releases) page and download the latest `.unitypackage` file.
62-
63-
Try out `Scene_Playground` to explore some of the functionality and get onboarded to the SDK nicely!
52+
1. **Download:** Head over to the [releases](https://github.com/thirdweb-dev/unity-sdk/releases) page and download the latest `.unitypackage` file.
53+
2. **Explore:** Try out `Scene_Playground` to explore functionality and get onboarded.
54+
3. **Learn:** Explore the [.NET SDK Documentation](https://portal.thirdweb.com/dotnet) to find full API references.
6455

6556
**Notes:**
66-
- The SDK has been tested on Web, Desktop and Mobile platforms using Unity 2021 and 2022 LTS. We **highly recommend** using 2022 LTS.
67-
- The example scenes are built using Unity 2022 LTS, they may look off in previous versions of Unity.
68-
- The Newtonsoft DLL is included as part of the Unity Package, feel free to deselect it if you already have it installed as a dependency to avoid conflicts.
69-
- If using .NET Framework and encountering an error related to HttpUtility, create a file `csc.rsp` that includes `-r:System.Web.dll` and save it under `Assets`.
70-
- If you have conflicting DLLs from other SDKs, in most cases our SDK will be compatible with previous versions, use version control and test removing duplicates.
71-
57+
- Tested on Unity 2021 and 2022 LTS. Highly recommend using 2022 LTS.
58+
- Example scenes are built with Unity 2022 LTS; they may look off in earlier versions.
59+
- Newtonsoft DLL included; deselect if already installed to avoid conflicts.
60+
- If using .NET Framework and encountering `HttpUtility` errors, create `csc.rsp` with `-r:System.Web.dll` under `Assets`.
61+
- Use version control and test removing duplicate DLLs if conflicts arise.
7262

7363
# Build Instructions
7464

7565
## General
7666

77-
- Use `Smaller (faster) Builds` in the Build Settings (IL2CPP Code Generation in Unity 2022).
78-
- Use IL2CPP over Mono when possible in the Player Settings.
79-
- Using the SDK in the editor (pressing Play) is an accurate reflection of what you can expect to see on native platforms.
80-
- Set `Managed Stripping Level` to `Minimal` - you can find it under `Player Settings` > `Other Settings` > `Optimization`
67+
- **Build Settings:** Use `Smaller (faster) Builds` (IL2CPP Code Generation in Unity 2022).
68+
- **Player Settings:** Use IL2CPP over Mono.
69+
- **Stripping Level:** Set `Managed Stripping Level` to `Minimal` (`Player Settings` > `Other Settings` > `Optimization`).
8170

8271
## WebGL
8372

84-
- When uploading a final build, set `Compression Format` to `Disabled` in `Player Settings` > `Publishing Settings`.
85-
- To test In-App Wallets (OAuth) you must host the build or run it locally yourself after adding the `Cross-Origin-Opener-Policy` header and setting it to `same-origin-allow-popups`.
73+
- **Compression Format:** Set to `Disabled` (`Player Settings` > `Publishing Settings`) for final builds.
74+
- **Testing In-App Wallets (Social Login):** Host the build or run it locally with `Cross-Origin-Opener-Policy` set to `same-origin-allow-popups`.
8675

87-
Here's a simple way to do so, assuming you are in your WebGL build output folder:
76+
Example setup for testing In-App Wallet (Social Login) locally:
8877

89-
```csharp
78+
```javascript
79+
// YourWebGLOutputFolder/server.js
9080
const express = require('express');
9181
const app = express();
9282
const port = 8000;
9383

94-
app.use(function(req, res, next) {
84+
app.use((req, res, next) => {
9585
res.header('Cross-Origin-Opener-Policy', 'same-origin-allow-popups');
9686
next();
9787
});
9888

9989
app.use(express.static('.'));
10090
app.listen(port, () => console.log(`Server running on http://localhost:${port}`));
91+
92+
// run it with `node server.js`
10193
```
10294

103-
Once again, please note that no action is needed for hosted builds.
95+
No action needed for hosted builds.
10496

10597
## Mobile
10698

107-
- Our package comes with EDM4U which resolves dependencies at runtime, you may Force Resolve from the `Assets` menu > `External Dependency Manager` > `Android Resolver` > `Force Resolve` before building your game or edit its settings as you please.
108-
- If using InAppWallet OAuth on mobile, make sure custom schemes matching your bundle id are set in your `Plugins/AndroidManifest.xml` or equivalent. It should be set to your bundle id, for instance `com.thirdweb.unitysdk`
109-
99+
- **EDM4U:** Comes with the package, resolves dependencies at runtime. Use `Force Resolve` from `Assets` > `External Dependency Manager` > `Android Resolver`.
100+
- **Custom Schemes:** Set custom schemes matching your bundle ID in `Plugins/AndroidManifest.xml` or equivalent for InAppWallet OAuth.
110101

111102
# Need Help?
112103

113-
If you're unsure about something or need help, feel free to reach out though our [Support Portal](https://thirdweb.com/support).
104+
For any questions or support, visit our [Support Portal](https://thirdweb.com/support).
114105

115-
Thank you for trying out the thirdweb Unity SDK!
106+
Thank you for trying out the Thirdweb Unity SDK!

0 commit comments

Comments
 (0)