Flow Community Rewards are here. Earn points for engaging in the ecosystem, spend points on prizes. Learn more.
Developers
June 15, 2023
Unity SDK 2.0: Supercharge game development with Wallet Connect, iOS, and more
Ash Muller
Unity SDK 2.0: Supercharge game development with Wallet Connect, iOS, and more

Game development on the Flow blockchain has leveled up again with the release of v2.0.0 of the Flow SDK for Unity

This latest version of the SDK allows developers to tap into the power of Wallet Connect, a protocol which connects Web3 apps to wallets. Developers will find it easy to configure Wallet Connect through the SDK, in turn allowing their own users to connect the game to their Lilico mobile wallet. 

The initial release of the SDK contained Dev Wallet, a mock wallet provider, perfect for easy development within the Unity sandbox environment which also utilizes the Flow emulator. It also provided an interface which developers could use to implement their own wallet providers. Now with Wallet Connect in v2.0.0, the SDK contains all the tools out of the box for developers to take their game through the development cycle and into production. 

Future versions of the Flow SDK for Unity will continue to add support for more wallets in addition to Lilico. 

iOS now an official platform

The latest release of the SDK also sees the inclusion of one of the most popular target platforms for Unity games – iOS. Some developers may have already gotten their Flow SDK-powered games running on iOS, but the platform is now an officially supported platform as of v2.0.0. 

Cadence serialization made easier

Previously, converting between native C# types (eg String) and the SDK's cadence types (eg CadenceString) was a very laborious task, especially when your cadence scripts contained complex data structures in their parameters or return values. That is now solved with Cadence Convert, a feature in v2.0.0 which allows very easy serialization between C# and cadence types, and vice versa. 

Simply annotate your C# data structures with attributes that describe what their equivalent cadence types are: 

Then use Convert.ToCadence to convert it to a cadence object: 

Or, use Convert.FromCadence to convert a cadence object into a TestStruct object: 

More sample projects added

In addition to these new features and bug fixes, two new sample projects have been added in this release of the Flow SDK for Unity. 

Example NFT is a very simple project which demonstrates how to mint NFTs using the SDK. It also demonstrates how to read those minted NFTs from the blockchain. 

NFT Browser is a bit more of a real-world scenario. It's a simple viewer that lets you enter a Flow address and will display any NFTs owned by that account, so long as those NFTs implement the NFT and MetadataViews standards. 

Roadmap for the Flow SDK for Unity

When we first announced the Unity SDK, we shared that it was only the beginning and more updates were on the horizon. We're constantly working on improving the Flow SDK for Unity, adding new features and more samples to our growing list of examples and tutorials. Here is a general look at what major features we have lined up in coming months: 

  • v3.0.0
  • v4.0.0
  • Re-design of the Flow Control editor tools to improve UI \ UX

Flow has been thoughtfully built to enable game developers to push the boundaries of gaming on Web3, and by using the Flow SDK for Unity they can streamline the on-chain experience for gamers at scale. We’re excited to see what you accomplish with these additional tools and capabilities, and we can’t wait to share more updates in the future. Be sure to check back regularly for the latest!

Interested in building on Flow? Visit Flow’s developer portal to get started, and keep in touch with the Flow community on Twitter or Discord.