Hi guys, can you tell me how I can call a smart contract (that modify the contract state) from within Unity using the SDK?
Thanks.
Hi guys, can you tell me how I can call a smart contract (that modify the contract state) from within Unity using the SDK?
Thanks.
Hi, thanks for asking. This is a known issue.
You can use NEthereum with Wallet Connect but only in desktop apps at there moment.
I am working with the Wallet Connect / Unity developer to create a fix that will enable this feature on all platforms.
Regards,
David
You can use NEthereum with Wallet Connect but only in desktop apps at there moment.
Is there a doc for this specifically working with Moralis? It would help a lot.
Hello @dgoodrich & Moralis Community!
Great to connect and to learn more about opportunities within the world of Unity and Crypto. I am brand new to the Moralis community. Iāve completed the 3-minute dApp project and given the https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate a full review including publishing and playing with the demo.
I am an American citizen with over 20 years of game development experience. Iām shifting my own passions and experience toward the crypto side of gaming and found your company.
Unity is a rich toolset that is (deservedly) outside of the main crypto tooling pipelines and that is a missed opportunity as crypto+gaming continues its rapid ascent in popularity. Glad to see Moralis leading the way.
Kudos on the great work!
Iāll certainly have more questions and feedback soon.
Some suggestions for the GIT Readme
Thanks again!
-Sam Rivello
Unity Game Development Instructor
Resume | Teaching Portfolio: SamuelAsherRivello.com/contact/
Thank you for the comments. I do plan on creating some more complex examples to showcase more of the Moralis SDK.
Regards,
David
Hello Moralis Community!
Having fun with Unity+Crypto including Moralis and working my way through creating robust custom demos. More details to come! https://github.com/SamuelAsherRivello/Intro_To_Unity_Crypto/
Cool - are these live already?
Hi David,
Was just looking to try out the latest changes with the addition of support for webgl but it seems like there are some compile issuesā¦ maybe the api folder is missing in āAssets/MoralisWeb3ApiSdk/Moralis/Moralis.WebGL/Moralis.Web3Apiā? (there is a meta file but no folder)
Hi. we want to make a game with Unity and integrate with blockchain.
1: in your Youtube channel i just saw 1 video about Unity, did you have a full SDK or API for unity as well as React or other languages?
2: You have a server. What happens when the server shuts down ? so in this case our Dapp is not Dapp! and doesnāt work. Right?
3: if you support Unity, what Version is good for working with metamask or other wallets in a game? For example Mobile version or OpenGL version?
Hi, justed wanted to ask if Cloud Code support is available via this package.
If not, Iād like to know how to deploy some code to Moralis Cloud since our requirement hinges on it.
Sorry you encountered an issue with the new package. Were you using an existing project or a new project? Please let me know. To double check, I created a new project and imported the package. It ran without compile errors.
Some things to check:
Please let me know if this helps or not.
Regards,
David
1: in your Youtube channel i just saw 1 video about Unity, did you have a full SDK or API for unity as well as React or other languages?
Yes, the full SDK (other than Plugins - this is coming soon) is available for Unity3D. Moralis also offers the full SDK in JavaScript, React, and React Native.
2: You have a server. What happens when the server shuts down ? so in this case our Dapp is not Dapp! and doesnāt work. Right?
Moralis has layers of servers distributed across the globe so a complete outage is very unlikely.
3: if you support Unity, what Version is good for working with metamask or other wallets in a game? For example Mobile version or OpenGL version?
Any version of Unity3D, 2020.3 and newer. The platforms should all work with the same wallets. The SDK utilizes Wallet Connect so any wallet compatible with Wallet connect can be used. That being said we have noticed that Metamask sometimes has issues communicating with Wallet Connect (we do know that Wallet Connect and Metamask are actively working on this). Due to this we usually test with other wallets.
Hope this helps. Please let me know if you have any other questions.
Regards,
David
So far I understand from the code base that I can execute Cloud functions from Unity but I see no means to deploy cloud functions. Maybe I have to use JS for that.
Thanks for asking, yes, Moralis Cloud Functions are supported by the oralis / Unity SDK. The newest version of the boilerplate demonstrates this in the TokenListController.cs file.
Here is the code snippet that shows how to call a cloud funtion:
// Field(s) for the cloud function.
IDictionary<string, object> pars = new Dictionary<string, object>();
pars.Add("url", token.Thumbnail);
ResourceResponse resourceResponse = await MoralisInterface.GetClient().Cloud.RunAsync<ResourceResponse>("loadResource", pars);
The code for the Cloud Function being called, āloadResourceā, is in the Boilerplate README.
Please let me know if you have any other questions.
Regards,
David
You can add Cloud functions directly in your Moralis Server or by using the CLI (correct this is Javascript)
Regards,
David
Please check out the Cloud Functions doc page for more information about using CLI to deploy Cloud Functions.
@dgoodrich I had posted a comment a while back on YouTube where you introduced the Unity package.
There Iād said this:
Iād really appreciate if the Moralis package was compatible with UPM for convenience. The Example directory could be part of Example Assets deployed once the package is installed. This also makes it easier to clone the project once and simply update by pulling from a stable branch or commit every time a release is available, and having the package included from the Package Manager.
I am currently working with Unity to publish to the Asset Store. Once that is done you will be able to use Package Manager to perform updates. It is all a process
Regards,
David
One more question that popped up is: how do I upload data to Moralis for use in a database, which will be read off by an oracle on a smart contract?
You can find sample code to save data to the Moralis Database in the bloilerplat ReadMe here.
If you want an Oracle to read the data you probably want to set up a Cloud Function to front the data.
If I have misunderstood you question please let me know.
Thank you,
David