1

I am making an application in C# unity and trying to integrate polkadot wallet in the application. I want to know whether it's possible to use the polkadot wallet browser extension to sign personal transactions.

4 Answers 4

3

The maintained project for substrate-based chains and Unity integration is covered here in this substrate seminar and the linked GitHub.

Build .NET and Unity Parachain apps | Substrate Seminar https://youtu.be/IAdvCbK0kQI

Substrate C# Toolchain that generates a NET API and more https://github.com/ajuna-network/Ajuna.SDK

Basic NET API for Substrate (follow-up project of SubstrateNetApi) https://github.com/ajuna-network/Ajuna.NetApi

I hope that helps with the Unity integration.

1

Polkadot JS is written with JavaScript, so your ability to integrate it into a C# application is the same as being able to integrate any JavaScript library into a C# project. (probably not very good)

What you want is a library written in C# like: https://github.com/usetech-llc/polkadot_api_dotnet

However this project does not seem to be well maintained at the time of writing this, so probably you will need to reach out to the contributors or fork it if you want to use it in a modern Substrate application.

1

Since this post is popping up in search results in 2024, worth adding that there is now available the Polkadot SDK for Unity on the Unity asset store:

https://assetstore.unity.com/packages/decentralization/infrastructure/polkadot-sdk-for-unity-273535

I've not had experience with it yet but it does come with a few demos including a demo wallet so it might be a good path forward for anyone looking to integrate Polkadot tech into their Unity game.

0

I'm under the impression that the browser extension wallet is not meant to be used from outside the browser. So, unless you are using unity for creating a WASM module that can only be consumed from the browser, and then you add some layer so that the Web-Worker that will be serving the WASM module somehow has access to the global scope where the browser wallet is injected, then unless that's the case... I'm afraid that nope, you can't consume the browser wallet from a unity project.

However, have you considered integrating your unity application with Parity Signer instead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.