Tutorial | Get started with Blockchain SDK for Unity

hi all pat Labine VP of engineering at engine this is a live dev stream of how to onboard yourself onto the engine platform using the Unity engine so the first thing to do is you need to go to Cove and cloud engine that IO that is where our test net setup is and create an engine account so we go here and create an engine account just give clicking and then sign up I’m gonna want to go to documentation so here we have the getting started guide this is the general getting started guide for both unity and graph QL which is the other main way you could talk to our platform generally what you do is you create your app you create your user which he just did Kramer here you create an app you create a wallet you fund it you link your your wallet to the app then you’re ready to create items next stage is you create your items then the stage after that is you use those items in a game so we just created our our user so we’re gonna go on to the next step which is create a wallet so we’re gonna go here you know create wallet and as well let’s create wallet and if you see a blank here I’ll just tell you what it is because it’s our privacy thing it’s a new wallet dialog confirm wallet I’m gonna make a new wallet called Kramer okay since we’re on Kovan you want to add Kovan aetherium and Kovan ang and check everything else create wallet give it a password confirm boom now you have a wallet ah the next stage is you need to fund the wallet so you need engine coin and aetherium to sign the transactions to do stuff usually what you do is you go to Covent Fawcett by engine that I owe here and what you would do is you would paste your address don’t receive funds copy address go back here paste it it’s not gonna let me do it because I’ve already redeemed stuff today but let’s see what it does yeah you already use the faucet today so I’m gonna have to fund the wallet I’m gonna fund the ball it just using one of my other wallets so I copied the address I’m gonna go to creator just one of the main accounts I use and I’m gonna send it’s an engine coin I’ll just send honored put your password in okay also mean the Sun some if so paste at some point one now if I go to Kramer’s wallet there you go so I have a hundred engine coin and point one each which should be enough to pay for the transactions for what we’re doing today great so now we’re at the part where we could go to unity so I got unity here I got a fresh project in unity and this is just an empty project I created normally you would down download everything from the asset store but we’re still in development so I’m just gonna import a package so how you do that is the import package custom package and then I’m gonna pick this open imported right so we imported our engine you have an SDK we have that editor as well so that’s what we’re gonna be using so the editor isn’t really designed to do a lot of super super heavy lifting or batch processing or anything like that but it’s really a good way to kind of look stuff up or if you’re creating a small amount of items so we’re just gonna fire up the editor here and we’re gonna log in as US creamer great so the next thing we need to do is add an app so any time you’re working with items or anything with the trusted cloud you need an app to work with in addition to your user so we’re gonna add it up a lot of my test items are fruit based so I just kind of do you fruit type stuff for the URL see I use a service here to host them images and metadata I’ll just go to that paste that here then create great so our app is created if you luck see we’re the only ones here where the admin there’s only a single identity with a linking code so the next step we need to do is we need to link our wallet with our game so you could look in here for that or you could go to the wallet tab it’ll say here’s your linking code so we’re gonna link Kramer to that so we’re gonna go back to the wallet go to link taps and we’ll go to Kramer he’s not linked to anything yet so right now the dialog is just asking me which wallet keys I want to use Kramer want to use link code f3s a to L now the dialog is asking me which network how many use let me use go down and move it now it’s just telling me that the link has been confirmed root blaster I can actually look in here I could see what our platform ID is our app ID is 52 so usually pretty handy to know that and our identity ID is 105 so it’s important to know that you can only have one identity per user per game so that means a single user could have identities for different games many different identities in the system so once we do that on here we could click refresh in unity there we go so we should be able to see your balances are linked address and everything so now we’re ready to actually create some items so to do that you go over to the crypto items tab you go create and we’re gonna create an item golden banana and let’s have a thousand of these you can see that values are dynamically updating here initial reserve I’m not gonna explain these in full detail they’re explained in the documentation the initial reservist how many of you will want to prepay for in thing let’s do a hundred cost us 10 inch supply type fixed it’s different types they’re transferable you want to do you want players to be able to trade these do you want them to be down you want temporary is their tradable now but as the creators of the item we reserve the right to make them non-tradable later transfer fee settings up here but let’s just do a per crypto item transfer and we’re gonna just do point 0 1 so that means for every banana you trade the sellers going to get charged point 0 1 inch for that so it’s a great way to make passive passive income on your item economy your melt fee this is how much engine coin gets returned back to you as a creator when items are melted so it could be up to 50% so it means 50% will go to the player and 50% will go to you metadata URI we go and here like I said I have some pre-made items so a banana dot JSON just so this is for all your off chain data there’s documentation about the format you can use it for anything rarity any sort of generalized data and then just double check everything and we hit create Oh ah so what we need to go back here one step I forgot is when you link you’re gonna get a notification in the wallet to approve usage of your edge so what you need to do is you actually need to allow the smart contracts to access your ending coin on your behalf to create these items so that was unity telling us that we didn’t approve I approved the request so if I come back here and try it it should work okay we have to wait for the transaction to be approved that’s right there we go so the smart contracts are allowed to use our edge now we’re gonna get an approval request to create golden bananas let’s create confirm the create now we wait for the blockchain to confirm stuff you will get notified there we go so setting the item URI setting the metadata for for an item is also a transaction so we did the create now we’re gonna be the set item you are all right awesome so we have created our item but there’s zero circulating so if you actually go in here and look at your link tops for your collectibles for Kramer it’s not gonna show anything because we haven’t actually created anything yet so now what we’re going to do is mince some bananas let’s mint all 100 we’re gonna drain our reserve but it’s not going to cost us anything the mint these and go here mint some golden bananas confirm now we have to wait for the block team to confirm him everything for our transaction to be mined and there we go if you go and look at the collectables for Kramer should actually be able to see our bananas and if you tap in the banana you should be able to see all the metadata associated for that item great so that’s item to this video the next video I’m going to do is we’re gonna use this item in our simple game example which is part of the SDK thanks

19 thoughts on “Tutorial | Get started with Blockchain SDK for Unity”

  1. at 6:20 my login screen sticks about 15% and there is an error in unity console. i'm stuck, please help. its a long error, here is the main sentence: KeyNotFoundException: The given key was not present in the dictionary.

  2. this tutorial is usless the screen you have on the right is not explained even a little and with out that you cant move on.

Leave a Reply

Your email address will not be published. Required fields are marked *