Releases: thirdweb-dev/unity
v4.14.0
What's Changed
Massive upgrade to the WalletConnect SDK
In previous versions of our SDK, choosing WalletConnect was akin to choosing MetaMask as a WalletProvider when connecting. We wanted to make sure we captured most of the WalletConnect features and have the two connection methods achieve different things, respectively:
- Provide a simple interface for a single MetaMask connection using the native MM SDK, where you can easily customize the prefab, and in WebGL use the browser extension instantly without UI.
- Make WalletConnect the option to support now over 400 wallets using a standalone modal that fits right into your desktop and mobile games.
We've now reached the point where we can gladly say WalletConnect is a stable option for developers who want to support external wallets, perhaps alongside web2 login options thirdweb provides - it has been customized to be fully integrated with the thirdweb Unity SDK, and you can now reach a wider audience easily.
To connect using WalletConnect, as usual, simply call SDK.Wallet.Connect
and the magic will happen automatically.
using Thirdweb;
public async void ConnectWallet()
{
// Reference to your Thirdweb SDK
var sdk = ThirdwebManager.Instance.SDK;
// Configure the connection
var connection = new WalletConnection(
provider: WalletProvider.WalletConnect,
chainId: 1
);
// Connect the wallet
string address = await sdk.Wallet.Connect(connection);
}
WalletConnect Updates
- Support for additional wallets: you can now connect to 400+ different wallets using their respective deeplinks, cross-platform.
WalletProvider_WalletConnect
now fully utilizes the WalletConnect UI Modal.- You can customize which wallets to include, this feature was previously only available for WebGL, add the wallet ids to your ThirdwebManager's WalletConnect Options to use this.
- Support for selecting different accounts for wallets that integrate this feature.
- Support for connecting to multiple chains, and switching networks without being prompted until the next request comes in (big UX difference specially on mobile!)
- All issues with reconnection have been fixed, disconnect and reconnect as you please, with any wallet you like!
- All issues with mobile deeplinking and redirection have been fixed.
- UI adapts to screen size and orientation.
Special thanks to the WalletConnect team for help with debugging and integration to get this to the finish line.
Preview: Standalone target (Desktop)
Preview: Mobile target (will scale down based on phone screen size)
Miscellaneous updates
- [WebGL] Updated bridge.
- [Native] Improved network switching functionality for the MetaMask WalletProvider.
- [Cross-Platform] Added support for new chains.
This is a minor update, please remove the previous SDK before importing to avoid conflicts, and reimport files to unload DLLs as needed.
v4.13.3
What's Changed
- [Cross-Platform] Updated ThirdwebManager prefab default chains, added Polygon Amoy, Xai and Xai Sepolia.
- [Cross-Platform] Updated chains package.
- [iOS] Removed
Starscream
pod fromMetaMaskDependencies.xml
which could cause duplicate symbols when building with some versions of Unity/Cocoapods. Thank you @coding-velociraptor for reporting the issue.
v4.13.2
What's Changed
- [Native] ETH <> GWEI <> WEI decimal conversions are now more accurate.
- This includes
Utils.ToWei
andUtils.FormatERC20
. - When an overflow occurs (i.e., the number is too small or large for a decimal, such as with ERC20 large supply), the system falls back to using floating point arithmetic to handle the conversion.
- Culture invariance is now respected throughout these flows.
- This includes
- [Standalone, Android] Smoother OAuth Cancellation Handling.
- Reattempting to authenticate using OAuth (Google, etc.) before the first attempt succeeds or times out when using
InAppWallet
no longer throws. - Explicitly calling
InAppWalletUI.Cancel
now properly resets state and throws as usual. - Case of cancelling by calling
InAppWalletUI.Connect
again before the first one completes is now handled properly and only logs a warning.
- Reattempting to authenticate using OAuth (Google, etc.) before the first attempt succeeds or times out when using
- [Native] Added
endSessionOnDisconnect
option inPrefab_ConnectWallet
. You may enable this to force reauthenticate after disconnecting and not preserve sessions, for instance when usingInAppWallet
.
v4.13.1
What's Changed
- [Cross-Platform] Added various new chains, including
B3 Sepolia
. - [WebGL] Reinitializing the SDK to a different chain and reconnecting to an
InAppWallet
(orSmartWallet
using anInAppWallet
as an admin) no longer triggers the connection flow again and automatically reconnects you as long as the email or phone number provided are the same as the previous connection's. Explicitly callingDisconnect
after the first connection in this case would negate this behavior and normally go through the authentication flow again.
v4.13.0
What's Changed
- [Cross-Platform] Smart Wallet Option
Factory Address
is now optional in yourThirdwebManager
.- You may now use Smart Wallets without any setup.
ThirdwebManager
Smart Wallet OptionGasless
now defaults totrue
.- We still recommend deploying your own factory in production, however this makes it easy to prototype cross-chain!
- [Cross-Platform] New Feature - Buy with Fiat
- OnRamp to crypto tokens using a credit card!
- US Support (International support coming soon).
- Multistep Buy with Fiat -> Buy with Crypto support for less liquid tokens, using intent identifiers.
- Testmode example available in
Scene_Pay
.
- [WebGL] Updated bridge.
This is a minor update, meaning some structural or api breaking changes occured. When upgrading, it is best to remove previous SDK files for a smooth importing process, backing up any prefab copies or scripts extending or overriding thirdweb prefabs and scripts.
v4.12.4
What's Changed
- [Cross-Platform] Added support for Treasure Ruby testnet.
v4.12.3
What's Changed
- [Native] Non-Blocking Encryption/Decryption: The process of encrypting/decrypting data when connecting to a
LocalWallet
has been optimized to avoid blocking the main thread.- Resolved Issue: This change fixes an issue where users experienced a freeze of approximately 0.5 to 1.5 seconds upon connecting to a
LocalWallet
. - Performance Trade-off: As a side effect of this update, the connection time to a
LocalWallet
may be about 1 second slower, depending on the device's performance capabilities.
- Resolved Issue: This change fixes an issue where users experienced a freeze of approximately 0.5 to 1.5 seconds upon connecting to a
v4.12.2
What's Changed
- [Cross-Platform] Updated chains package, added new chains.
- [WebGL] Updated bridge.
v4.12.1
What's Changed
- [Cross-Platform] Added
Wallet.AuthenticateAndLoginServerSide
that helps you use thirdweb Auth more easily, cross-platform.- Previously,
Wallet.Authenticate
mostly acted as a signed payload generator rather than a full authentication flow, and stored a local SIWE style session. You had to do the extra work of serializing, encoding and logging in to your backend as an extra step. - You may use this helper method instead if you have thirdweb Auth setup on your backend, passing in your domain and chain id, to replicate a full login flow without having to deal with payloads, encoding or signing/verifying.
- Defaults to calling
/auth/payload
and/auth/login
, overrideable. - Works with Smart Wallets.
- Uses
UnityWebRequest
, meaning it's WebGL compatible, however make sure CORS is setup correctly to test in WebGL as usual.
- Previously,
v4.12.0
What's Changed
Providing new ways for devs to sponsor transactions, powered by Engine!
- [Cross-Platform] Added support for the thirdweb Engine Relayer
- This relayer is a service provided by thirdweb for an alternative way to sponsor transactions on behalf of users through Engine.
- When using
Transaction.Send
orTransaction.SendAndWaitForTransactionResult
you may specify whether to use this gasless feature or not, other higher level APIs will default to the gasless flow if you have the relayer set up. - Replaces OpenZeppelin Defender Options.
- We still recommend using Account Abstraction for gasless sponsorship features through Smart Wallets, however in some cases a relayer is needed!
- [Native] Improved
Contract.Write
flow.- Better gas limit/price/fees estimations when not provided, similar to other APIs.
- Now uses the gasless relayer by default if it is set up in your
ThirdwebManager
, similar to other higher level APIs.
Visit our documentation portal to learn more at https://portal.thirdweb.com/unity