Skip to content

Releases: thirdweb-dev/unity

v4.16.1

08 Jun 03:03
ac7d3ca
Compare
Choose a tag to compare

What's Changed

  • [WebGL] Added support for ZkSync Native Account Abstraction through Smart Wallets.

This feature was introduced for Desktop and Mobile platforms in 4.15.0 and is now available on all platforms!

v4.16.0

07 Jun 15:20
0ddee14
Compare
Choose a tag to compare

What's Changed

  • [Native] MetaMask SDK upgraded to 2.0.1, thank you @ecp4224 !

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.15.3

07 Jun 12:45
2a4b264
Compare
Choose a tag to compare

What's Changed

  • [Native] Improve Polygon Amoy gas estimations.
  • [Native] Fix regression introduced in 4.15.0 whereby InAppWallet login would fail due to incorrect client id propagation. by @FaB0SS
  • [Cross-Platform] Added support for new chains.

v4.15.2

06 Jun 20:11
380f6df
Compare
Choose a tag to compare

What's Changed

  • [WebGL] Added Rabby wallet extension as a WalletProvider option. Also added it in the Prefab_ConnectWallet example.
  • [WebGL] Improved post-error / post-rejection callback speed when a transaction reverts or the user rejects signing it.

38a5ce266a62da6e46c8cdab6bb7d447

v4.15.1

06 Jun 02:31
c77be11
Compare
Choose a tag to compare

What's Changed

  • [WebGL] Greatly improved contract interaction performance/speed when passed a custom ABI.
  • [Native] Fixed edge case where interacting with a contract that has two or more functions of the same name would result in the first function being called or throw.

v4.15.0

04 Jun 00:39
86c4d43
Compare
Choose a tag to compare

What's Changed

Removed all ThirdwebManager Instance references from internal code, meaning you can now instantiate the ThirdwebSDK or wrap it more easily in your own scripts.

The above change comes with a few breaking changes, as some code was rewritten and cleaned up to be more efficient and stable as we move towards Unity v5 which will mostly make use of our .NET SDK once cross-platform feature parity is achieved.

Breaking changes include:

  • Wallet.AuthenticateAndLoginServerSide is now just Authenticate.
    • The old Wallet.Authenticate and Wallet.Verify methods no longer exist as they were not useful client-side.
    • Nethereum.SIWE, Nethereum.SIWE.Core and Nethereum.GnosisSafe DLLs have been removed.
  • Pay is no longer static, you must now go through SDK.Pay.*
  • Blocks is no longer static, you must now go through SDK.Blocks.*
  • Raw Transaction constructor (not through Contract.Prepare) now takes in a ThirdwebSDK reference.
  • Most other raw constructors take in ThirdwebSDK or new parameters.
  • Some Utils now require additional parameters.

We still recommend using the ThirdwebManager if you are not familiar enough with the SDK and the values it expects for different use cases.

Additional Updates

  • [Cross-Platform] Added support for new chains.
  • [WebGL] Updated bridge.
  • [Native] Improved 1559 gas estimation for various chains, and added logic to handle edge cases and fallback gracefully.
    • 1559 estimations were previously overriden on some chains, all chains now properly estimate 1559 fees with the exception of Celo.
    • This should increase consistency with transaction submission speed and potentially reduce gas costs.
    • Added a ceiling for RPC providers that may return overestimate priority fees, making sure to avoid overpaying in such cases.
  • [Native] Smart Wallets now "just work" on ZkSync Sepolia and ZkSync Mainnet, all you need is to connect and set gasless to true.
    • Unlike other chains, ZkSync Smart Wallets simply "upgrade" your EOA and preserve their address.
    • All EOA wallets are supported.
    • You may transact gaslessly using ZkSync Smart Wallets on Mainnet and Sepolia using thirdweb infrastructure.
    • A client id is needed to enable this feature, make sure you set it in your ThirdwebManager!

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.14.1

30 May 19:10
7f62dbf
Compare
Choose a tag to compare

What's Changed

  • [Cross-Platform] Added support for new chains.
  • [Cross-Platform] Improved SDK initialization speed when multiple chains are supported.

v4.14.0

29 May 00:30
840abdc
Compare
Choose a tag to compare

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)

b312e809bd60bed0a30ca1323a6eb9db-1
07842b7a8754e062eebceb0f222e2cd4
0b5b29b305e3f683c45ea81419cfed24

Preview: Mobile target (will scale down based on phone screen size)

b7824a675cba5b3e693b6f22aca7d640
c673368b6c41ca37ad2587efffff2f2d
a4756c6d80b1820b3b1d2b9fd230840a

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

20 May 16:55
80f5652
Compare
Choose a tag to compare

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 from MetaMaskDependencies.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

17 May 19:30
918653d
Compare
Choose a tag to compare

What's Changed

  • [Native] ETH <> GWEI <> WEI decimal conversions are now more accurate.
    • This includes Utils.ToWei and Utils.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.
  • [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.
  • [Native] Added endSessionOnDisconnect option in Prefab_ConnectWallet. You may enable this to force reauthenticate after disconnecting and not preserve sessions, for instance when using InAppWallet.