Importing Nethereum in Unity
Connect Unity games to the Ethereum blockchain
Overview
This tutorial will import Nethereum to Unity and fetch the current block number.
- Download/Create Unity project
- Download Nethereum
.dll
- Import Nethereum in Unity
- Fetch current block height
Unity
Install Unity: https://unity.com/
Create a new Unity project.
Using Nethereum
There are a few ways to use the Nethereum library. This example will download the .dll
from Github.
Visit: https://github.com/Nethereum/Nethereum/releases/tag/3.5.0
Download net461dllsAOT.zip
If you encounter errors later on, remove
System.Net.Http.dll
andUnityEngine.dll
Drag the folder into your Unity project under Assets. Feel free to rename the folder. The Nethereum library is now available.
Fetch Block Number
For demonstration purposes, create a script in the Main Camera
Name it BlockNumber
Open the script
Update the script
Click Play and check the Console!
Conclusion
This article lays the foundation for more complex interactions such as sending and interacting with smart contracts. For another working example, check
Also, Read
- The Best Crypto Trading Bot
- Crypto Copy Trading Platforms
- The Best Crypto Tax Software
- Best Crypto Trading Platforms
- Best Crypto Lending Platforms
- Best Blockchain Analysis Tools
- Crypto arbitrage guide: How to make money as a beginner
- Best Crypto Charting Tool
- Ledger vs Trezor
- What are the best books to learn about Bitcoin?
- 3Commas Review
- AAX Exchange Review | Referral Code, Trading Fee, Pros and Cons
- Deribit Review | Options, Fees, APIs and Testnet
- FTX Crypto Exchange Review
- NGRAVE ZERO review
- Bybit Exchange Review
- 3Commas vs Cryptohopper
- The Best Bitcoin Hardware wallet
- Best monero wallet
- ledger nano s vs x
- Bitsgap vs 3Commas vs Quadency
- Ledger Nano S vs Trezor one vs Trezor T vs Ledger Nano X
- BlockFi vs Celsius vs Hodlnaut
- Bitsgap review — A Crypto Trading Bot That Makes Easy Money
- Quadency Review- A Crypto Trading Bot Made For Professionals
- PrimeXBT Review | Leverage Trading, Fee and Covesting
- Ellipal Titan Review
- SecuX Stone Review
- BlockFi Review | Earn up to 8.6% interests on your Crypto