Unity + MetaMask (WebGL)

BlockChain,NFT,Web3.0 2022. 1. 6. 14:36
반응형

메타마스크 가입 

https://metamask.io/

 

MetaMask - A crypto wallet & gateway to blockchain apps

A crypto wallet & gateway to blockchain apps

metamask.io

https://github.com/ChainSafe/web3.unity

 

GitHub - ChainSafe/web3.unity: Unity SDK for building games that interact with blockchains.

Unity SDK for building games that interact with blockchains. - GitHub - ChainSafe/web3.unity: Unity SDK for building games that interact with blockchains.

github.com

https://medium.com/coinmonks/unity-engine-metamask-wallet-6797d4699e45

 

Unity Engine + MetaMask Wallet

Automagically connect your Unity game with Metamask Wallet (or any web3 wallet)

medium.com

https://youtu.be/j5YF6gqzREc?list=PLPn3rQCo3XrOQkC3v55Ou8NMPgn8pb7O5 

 

 

 

 

https://youtu.be/DSjOJJ9oFIQ?list=PLPn3rQCo3XrOQkC3v55Ou8NMPgn8pb7O5 

https://github.com/ChainSafe/web3.unity

 

GitHub - ChainSafe/web3.unity: Unity SDK for building games that interact with blockchains.

Unity SDK for building games that interact with blockchains. - GitHub - ChainSafe/web3.unity: Unity SDK for building games that interact with blockchains.

github.com

패키지 임포트 

http://wiki.hash.kr/index.php/ERC-1155

 

ERC-1155 - 해시넷

ERC-1155는 암호화폐 아이템 표준이다. ERC-1155는 대체 가능 토큰인 ERC-20과 대체불가토큰인 ERC-721 토큰을 하나의 스마트 계약에 담아 결합한 것이다. ERC-1155는 대체 가능 아이템(ERC-20 토큰 아이템)과

wiki.hash.kr

https://testnets.opensea.io/

https://chainsafe.github.io/game-docs/

 

Docs - ChainSafe Gaming SDK

Documentation SDK: https://github.com/ChainSafe/web3.unity/releases Bridging Unity games to the blockchain. Create your in game NFTs. Discussion Discord: https://discord.gg/gG7dZrGJaa Tutorial Demo Installing SDK SDK Overview SDK Prefabs Create In Game NFT

chainsafe.github.io

https://testnets.opensea.io/assets/0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656/98615320484598992040676402456642409609199392447938652495052258767049420963841

https://docs.openzeppelin.com/contracts/3.x/api/token/erc721#IERC721-balanceOf-address

 

ERC 721 - OpenZeppelin Docs

For a walk through on how to create an ERC721 token read our ERC721 guide. Additionally, IERC721Receiver can be used to prevent tokens from becoming forever locked in contracts. Imagine sending an in-game item to an exchange address that can’t send it ba

docs.openzeppelin.com

using System.Collections;
using System.Numerics;
using System.Collections.Generic;
using UnityEngine;

public class ERC1155BalanceOfExample : MonoBehaviour
{
    public GameObject sphere;

    async void Start()
    {
        string chain = "ethereum";
        string network = "rinkeby";
        string contract = "0x88B48F654c30e99bc2e4A1559b4Dcf1aD93FA656";
        string account = "0xc5515290f762ba8E9310D04890Ca07ddBFf99DB3";
        string tokenId = "98615320484598992040676402456642409609199392447938652495052258767049420963841";

        BigInteger balanceOf = await ERC1155.BalanceOf(chain, network, contract, account, tokenId);
        print(balanceOf);

        if (balanceOf >= 0) {
            sphere.GetComponent<Renderer>().material.SetColor("_Color", Color.red);
        }
    }
}

https://app.mycrypto.com/faucet

https://app.mycrypto.com/faucet

 

MyCrypto - Ethereum Wallet Manager

Securely manage ALL of your crypto accounts with MyCrypto. Swap, send, and buy crypto with your favorite wallets like Ledger, Metamask, and Trezor.

app.mycrypto.com

 

 

 

재접속 

 

 

 

 

https://en.wikipedia.org/wiki/MetaMask
https://medium.com/coinmonks/unity-engine-metamask-wallet-6797d4699e4

https://chainsafe.github.io/game-docs/
https://testnets.opensea.io/asset/create
https://docs.openzeppelin.com/contracts/3.x/api/token/erc721#IERC721-balanceOf-address-
https://app.mycrypto.com/add-account

 

web3.unitypackage
7.95MB

 

 

https://youtu.be/3zCSuTl0Ads?list=PLPn3rQCo3XrOQkC3v55Ou8NMPgn8pb7O5 

https://www.youtube.com/watch?v=7D-pja1Dmkg&list=PLPn3rQCo3XrP-n_6tVVjCVRwiBjnzkj1T 

 

반응형
: