Giter Site home page Giter Site logo

nethereum.unity.webgl's Introduction

Nethereum.Unity.Webgl

Nethereum Unity Webgl sample starter

Example on how to integrate a WebGl unity project with Metamask, Deploy an ERC721 smartcontract (NFT) and interact with the smart contract minting a token and retrieving the asset (image) associated with it.

MMUnity2021 gif

Notes

Future thoughts, next steps:

  • Include in the sample WalletConnect, probably using a submodule to provide the integration guidelines.
  • Same example using Web3 / Tasks

nethereum.unity.webgl's People

Contributors

juanfranblanco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nethereum.unity.webgl's Issues

What is MetamaskInterop?

Assets/MetamaskController.cs(186,13): error CS0103: The name 'MetamaskInterop' does not exist in the current context

HI

I am encountering this when connecting to metamask ReferenceError: nethereumUnityInstance is not defined

Not Connecting Metamaks

when i build and run the project and click on connect button the metamask popup appears and then when clicked on connect button in metamask popup i am getting the error Uncaught (in promise) ReferenceError: nethereumUnityInstance is not defined
at _EnableEthereum (bld.framework.js:1311:3)

Typo in NethereumMetamask.jslib

I think there is a little typo in NethereumMetamask.jslib which causes to empty public key when accounts changed.
`

    ethereum.on("accountsChanged",
            function (accounts) {
                //console.log(accounts[0]);
                let account = "";
                if(account[0] !== undefined){
                    account = account[0];
                }
                nethereumUnityInstance.SendMessage(parsedObjectName, parsedCallbackAccountChange, account);
            });
    ethereum.on("chainChanged",
            function (chainId) {
                // console.log(chainId);
                nethereumUnityInstance.SendMessage(parsedObjectName, parsedCallbackChainChange, chainId.toString());
            });

`

in ethereum.on("accountsChanged, ...) accounts array typed as "account" (without 's')

Additional examples

Hi, can't find any info in the Nethereum documentation about using this. Can you please to some additional examples? Thx!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.