Ethereum Unity3D Boilerplate Questions

Have you seen the migration walkthrough video?

Hi @dgoodrich & @0xprof,
We are making WebGL game with Moralis and Metamask using Unity. Everything working fine from login to call contract function.

But we want auto-login Metamask(without popup) if the user reopens the tab or refreshes Tab once the user login with Metamask. It is possible with WebGL Moralis?

you want the connection to persist ?

1 Like

@0xprof Yes, I want a connection to persist after refreshing Tab.

1 Like

this is not currently available

1 Like

Thank for clarifying!

1 Like

This feature is in our development backlog so is coming.

We have a backlog item for Magic integration so it is coming.

At this time you would need to perform the integration yourself.

Does anyone know how to parse

'outputs': [{'components': [{'internalType': 'uint256', 'name': 'playerId', 'type': 'uint256'}, {'internalType': 'address', 'name': 'owner', 'type': 'address'}, {'internalType': 'string', 'name': 'name', 'type': 'string'}, {'internalType': 'uint256', 'name': 'experience', 'type': 'uint256'}, {'internalType': 'uint256[5]', 'name': 'stats', 'type': 'uint256[5]'}, {'internalType': 'uint256[7]', 'name': 'equipedItems', 'type': 'uint256[7]'}], 'internalType': 'struct Player', 'name': '', 'type': 'tuple'}], 'stateMutability': 'view', 'type': 'function'}

into an output object[] such as:

outputParams[0] = new { internalType = "uint256", name = "playerId", type = "uint256" };

what confuses me is that it is a nested class, and i have no idea how to get it working with web3 native RunContractFunction.

Thank you very much for these detail, do you think it is worth spending time on this or you think it will be available soon ? nooo pressure here :blush: haha

1 Like

Not sure how soon, have a couple of things ahead of this priority wise. If you move forward on your own you would be in a great position to help others in the community that are working to solve the same issue!

1 Like

Hi everyone,
I am testing Moralis SDK in Unity.
In Android platform, It is ok for login via Metamask. But when sending transaction via Moralis.SendTransactionAsync(), It does not switch to Metamask app and receive result automatically.
When I switch to Metamask app manually, there is still transaction request popup on Metamask app.

How can I send transaction via Metamask and It switch to Metamask app automatically on Android ?

Many thanks,

Hello everyone. Just installed a fresh version of the Moralis Unity SDK v1.2.0 using Unity 2021.3.3f1 as shown in the Release Notes.

As you can see, there’s no Moralis WebGL Template in the PlayerSettings tab. Any ideas?

I imported the Moralis WebGL Template directory from v1.1.0 asset package and the Fireworks scene seems to be working OK with WebGL.

Will keep you posted if I have any other issues.


Im having a long delay between transaction confirmation and the Unity listener picking up a Mumbai testnet event, Is there a specific block confirmation number needed for Moralis to acknowledge a transaction as confirmed?

Also, What is the SDK v1.2 way of initializing Moralis without using the Auth prefab.

In >v1.2 I have:

public MoralisController moralisController;
await moralisController.Initialize();

i am getting the "please build your WebGL project to connect " prompt after i have created a new empty project.

i also cannot see the Moralis WebGL template in the player settings.

i have followed everything…something i have missed?

i have the same problem my friend.

i did the tutorial successfully with their game inside the package, but now i just want to use it for my own game and i cannot use the Moralis template as it doesnt show up.

As I mentioned in a previous post, the solution I found is the following:

I imported the Moralis WebGL Template directory from v1.1.0 asset package and the Fireworks scene seems to be working OK with WebGL.

Then again, it’s only the WebGL Template directory. Ignore the rest of the package so you are 100% in v1.2.0.

sure thing, so you solved the issue with the WebGL template showing to be selected in the Player settings?