hey folks! today we are going to check our metamask wallets using Unity! we are getting ready to make a #crypto game, and we are testing the Netherium API for interacting with your wallet with unity! the next videos will go over using crypto to purchase in game items with unity!
Like and Subscribe!
Send me a gwei! (ether address, all donations accepted!) 0x95F4EaB8A738F4F27e7c04aEe1E10C8E666C2D0c send me a satoshi! (bitcoin address, all donations accepted!) 31zvj8ybxVVTLw6nPvAHYqu3qDVhC1sRqk
Want to send me something? Technivorous 902 n Hughes Blunt Sd 57522
AI Generated·May contain errors
All right, and welcome welcome today we are going to be integrating ether with
Unity and we're gonna be doing that using any theorem and the way that this works basically is the any theorem
Is an asset that has wrappers for the things that we need such as checking balances and sending and receiving
Cryptocurrency so in order to get this set up properly
The first thing we're gonna do is we're gonna head over to the site that I've dropped in below and you're gonna make sure that
You have everything properly hooked up and in order to do this, you're gonna need unity
You're gonna need any theorem and we are gonna be using in Fira because it's pretty simple and self-explanatory
So in Fira simply go to in Fira dot IO
Register yourself an account. It is free and create a new project
I would name that project whatever you're gonna name your unity project, but really it doesn't matter. This is just for test purposes
So I'm assuming you already have unity if you found your way here
Any theorem is going to be the package. We're gonna be using and you can download that from their github
I'll include a link to this down below as well
and you're gonna want to grab the
Any theorem unity zip there, okay
And there are a couple of files that you need to remove from there
That is all gone over in this quick introduction here showing you where to
Install it how to add it to your project things like that
so super simple basically you download it unzip it delete the two files and then you can drag and drop all of that right into
Your assets in your unity game once that's done. You're basically at the point that I'm at now and that is
Ready to do some testing. So the first thing I did
Was I created a script now this ETH test script?
It's not set up properly
We're gonna be using the get balance script instead. Okay, so let's
Go in here and take a look at that. This is written basically word-for-word off of the code on that tutorial
I gave you except you'll see here. I have a dummy account set up where I can grab
My wallet, this is a wallet for my dummy and I am running that on
Robson so it's an account created through metamask wallet like I showed you in the last video and
Basically we go here. Let's jump over here real quick
Grab a new tab
Open up metamask here and
You can see this is oh, that's my actual account. Let's go to the Ropsten test network
Okay, this is gonna be where you create fake accounts test accounts. This one is empty
You are gonna need two of them
My other one does have some F in it
If you don't know how to do that
You're gonna click buy and go to the faucet and like I said, I showed you how to do that in my last video
This is basically all set up the only other thing you need is
Infero.io as I said, go ahead register here get all signed in
Pop over my dashboard click Ethereum and I have this project ether.io and there's been four requests today
Those have all come from my unity program and they've all been in the last 20 minutes while I was testing to make sure everything
Still works. So once you're in here, if you go ahead and click settings
You can get some info that you need now
I really don't need to block any of this out
If you're doing this for an actual project, you don't want to be showing anybody these numbers
Basically, the endpoints I have set up for this right now are on main net. I really want to use Ropsten
Because that's where my test account is when I go live with the game
I will change it back to main net and I'll make a couple adjustments. Basically, we're gonna take
This right here
That is the site that we are routing through and we're gonna put that in right here, okay
Again, all of this code is available on the practice page here
Let's make sure
Ethereum copy of that. No, that's not what I want. Okay, so basically
We're gonna go through this code routine here. This is a script that is just attached to
This empty F net object. Okay, there is also
This F test script. We're gonna remove this component. Like I said, this is not not working
That was my original test and it did not work. So you see that there's nothing you can access here right now
Let's go to
My get balance code and we can actually do this. Let's do
Public string wallet. Okay right now that's empty but
So save that
and now
Basically, I added a variable that I can just punch my wallet in when it's done compiling. We'll do that
We're gonna need to grab something first though. So let's get
The wallet that we want to use
This one has one point nine nine nine F in it. So if I click on this it'll copy my wallet address
And to get the balance we only need the address anybody can pretty much check the the balance of any address we don't need
The key in order to send money from that account we'll need a key and we'll look at that in the next video this one's
Let's see, so now it's all caught up F net we want to put our wallet in here
Okay. Now this will stay
permanently and
We can run the program basically
It's going to load everything up and then over here in the console where we're printing this out it's going to give us our
Balance now one point nine nine nine F. That's what shows up in
Meta mask when we look at that account, so that is correct. So let's do this. Let's take
This guy
Let's go to our other empty account. Okay, this has none in it
And we need to grab that wallet
Open metamask copy the wallet
and
We'll paste that in here
And we'll run it again. And this time we should get zero
Because there's no F in that wallet
Yep, here you go. So that's pretty quick and easy how to access from unity your ether wallet
So we are going to be using this process to send and receive in order to create in-app purchases for this game here
so stay tuned for that should be pretty fun an interesting project and if all goes well, we'll have a
playable game up and running for people to purchase and trade objects, so
That's gonna be it for this video guys. I hope it was helpful to you
Don't forget to hit subscribe if you want to see more videos like this leave me questions down below in the comments
I am always happy to work on new things
I do a lot of other tech stuff 3d printing coding things like that on this channel. So definitely stick around
There's lots more to see and hit that little bell icon
Make sure you don't miss any of those upcoming videos. That's gonna be it for me guys tech never is out