2

So I'm building an HTML5 Unity game that will run in an internet browser attached to the Interplanetary File System. Unity allows for JSON files to be used to send and receive binary data between applications. This is perfect to allow activities that players partake in via the game to be recognized on the EOS blockchain.

My question is, is it simply a matter of creating a JSON struct in Unity that is sent via an API to the smart contract ABI that is then recorded on-chain to do what I want it to do based on the coding of the smart contract?

So if I have a Unity struct that authorizes the transference of coins collected in-game to a user who is signed in through Scatter, that info is sent to the blockchain via the ABI (with the same struct) and basically tells the smart contract that User A is confirmed as having X amount of coins that can then be airgrabbed for instance on let's say EOSToolkit or Greymass for instance. That's what I'm trying to do, I just want to make sure I have it right before going down a rabbit hole that was incorrect.

0

If Unity supports the ability to transfer JSON objects through RPC, Javascript, or through bash commands in some way then what you are doing should work fine. Your smart contract on the back end will need to be capable of receiving the JSON data and process it accordingly of course.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.