Releases: thirdweb-dev/unity
2.0.0-alpha
Native platforms support
The thirdweb SDK can now be used on ANY unity platform with the same, convenient API!
- WebGL
- Desktop
- Android
- iOS
- VR
- Console
This means you can now build desktop and mobile games with web3 functionality, and test real web3 interactions straight from your Unity editor!
This includes wallet connectivity. Native platforms can connect wallets via:
- Device wallet - a generated wallet that lives on the users device, optionally password protected and exportable to MetaMask
- WalletConnect - connect any mobile wallet to your game via QR code
In order to simplify maintaining wallet connections accross the game, you now need to use the ThirdwebManager
prefab in your scenes. This allows to configure chains, overrides and maintain wallet connection state everywhere.
1.1.5
Upgrade to latest SDK with fixes for custom EVM chains
1.1.4
Changelog
- SDK: Any EVM Support! pass any RPC url when initializing the SDK - you can find RPC urls on https://thirdweb.com/chains
- Connect Wallet Prefab: You can now add Unity callback events from the inspector directly for each wallet event
- Connect Wallet Prefab: The "Metamask" button is now set up to use the Injected provider by default, meaning you can connect any browser wallet using it now
- Package: Newtonsoft Json DLL added as part of the .unitypackage - import if you do not have it installed, feel free to deselect otherwise.
v1.1.3
NEW - Events Prefab, Reading, Writing and Misc Examples!
This update comes with additional minimalistic prefab/script examples and SDK updates including the addition of Events, Event Listeners and updated Thirdweb Auth support. Try out our new example scene!
Events - Fetch and manipulate Contract Events with a simple API!
- Get specific events from any contract.
- Get all events from any contract.
- Event listener support with callback actions.
- Optional query filters.
Reading - Reading from a contract!
- Fetch ERC20 Token(s).
- Fetch ERC721 NFT(s).
- Fetch ERC1155 NFT(s).
- Fetch Marketplace Listing(s).
Writing - Writing to a contract!
- Mint ERC20 Token(s).
- Mint ERC721 NFT(s).
- Mint ERC1155 NFT(s).
- Buy Marketplace Listing(s).
Miscellaneous - More examples!
- Get (Native) Balance.
- Custom Contract Read/Write Calls.
- Authentication.
- Deployment.
v1.1.2
Connect Wallet Prefab Visual Update + Wallet Balance + Network switching
- The Connect Wallet prefab now optionally supports network switching - you can activate/deactivate this functionality and related UI from the Inspector.
- It also now shows the user balance for the selected chain
- This also comes with a visual upgrade and new icons
- You can now set your supported networks from the
ThirdwebManager
prefab in your scene - Other QOL changes like using an enum for Chains
Build the Examples/Scenes demo to try it out!
v1.1.1
NEW - NFT and NFT Loader Prefabs!
Introducing the Prefab_NFT
and Prefab_NFTLoader
prefabs - instantiate an NFT and load it through script with the former, or drag and drop a fully functional and customizable ScrollView (Grid Layout) and set it up to display whatever NFTs you want from the Inspector!
Changelog:
Prefab_NFT
Displays an NFT by calling LoadNFT through script
- Instantiate this Prefab
- Get its Prefab_NFT component
- Call the LoadNFT function and pass it your NFT struct to display your fetched NFT's images automatically
- Customize the prefab to add text/decorations and customize LoadNFT to use your NFT's metadata if you want to populate that text
NFT nft = await contract.ERC721.Get(0);
Prefab_NFT nftPrefabScript = Instantiate(nftPrefab);
nftPrefabScript.LoadNFT(nft);
Prefab_NFTLoader
Standalone Drag & Drop grid/scroll view of NFTs you ask it to display
- Go to the prefab's Settings in the Inspector
- Load specific NFTs with token ID
- Load a specific range of NFTs
- Load NFTs owned by a specific wallet
- Or any combination of the above - they will all be displayed automatically in a grid view with vertical scroll!
- Customize the prefab's ScrollView and Content gameobjects if you want your content to behave differently.
Prefab_ConnectWallet
- Removed custom logging function for simplicity
- References ThirdwebManager to get the SDK now
ThirdwebManager
Minimal prefab added into the scene for convenience and cross-script reference of the SDK when using multiple prefabs.
- Drag and drop into your scene and input the chain you'd like it to use from the Inspector
- Reference the SDK in your scripts with ThirdwebManager.Instance.SDK
- Get the chain ID if needed with ThirdwebManager.Instance.GetChainID()
v1.1.0
NEW - Connect Wallet Prefab
Introducing the first prefab of the SDK: a fully functional Connect Wallet button. Lets you choose the wallet providers options for your users, which chain id to connect to and easy to customize to make it your own.
Expect more features and more prefabs coming soon!
Structure change:
The package has been re-organized into Core / Examples.
Core: all the scripts and most barebones demo scene
Example: Prefabs and more fully featured demo scenes
v1.0.1
NEW Magic.link connection support! (alpha)
- Connect the user's magic.link wallet with email or social logins
- Interact with that wallet like a regular wallet using the SDK functions
First, you'll need to pass your Magic.link developer API key in the SDK options like so:
var sdk = new ThirdwebSDK("goerli", new ThirdwebSDK.Options
{
wallet = new ThirdwebSDK.WalletOptions
{
appName = "Thirdweb SDK Demo",
extras = new Dictionary<string, object>
{
{"apiKey", "your_api_key"},
// ... any other magic.link options here
}
}
});
Then you can initiate the magic.link login flow like the other wallets:
string address = await sdk.wallet.Connect(new WalletConnection
{
provider = WalletProvider.MagicAuth,
chainId = 1 // ChainId to connect to
});
API changes
- SDK options now have separate
options.wallet
andoptions.storage
FundWallet()
has been moved fromsdk
tosdk.wallet
v1.0.0
After extensive Beta testing, the thirdweb Unity SDK v1.0.0 is now officially stable!
Thank you for all of you who gave feedback during the beta phase.
Full documentation, guides and examples available on our portal
Happy building!
v1.0.7-beta
What's Changed
- Initial fund wallet functionality by @joaquim-verges
- Fix return type for ERC20.Claim()
Full Changelog: v1.0.6-beta...v1.0.7-beta