Unity moralis sdk

Hi, I donwloaded the boilerplate for unity. Its working with ETH, but how can i change it to AVAX ?

2 Likes

I was looking for the same, is there a way to add it to the connection menu or how do I switch networks in the background

1 Like

I’m not a unity sdk expert, if you have more questions best to ask it in the unity boilerplate forum, but as I remember for unity boilerplate there’s only walletconnect, so assuming you use walletconnect you need to set your network to AVAX first before connecting coz there’s no switch network option on walletconnect like in Metamask~

1 Like

@Dannyslab and @davidcryptocol,

Sorry for the delay, I was traveling for the holidays. A couple of things:
To just update the Demo Application:

  1. To change the Wallet Balance: In Hierarchy, select UICanvas->UIPanel->WalletModel->Modal->Panel
    1a. In the Inspector view, under "Wallet Balance Controller (Script), change the “Chain Id” value. For Avalanche this is 43113 for testnet and 43114 for main net.
  2. To change the token list: In Hierarchy, select UICanvas->UIPanel->WalletModel->Modal->Panel->TokenListContainer->TokenListContent.
    2a. In Inspector view, under "Token List Controller (Script), change the “Chain Id” value. For Avalanche this is 43113 for testnet and 43114 for main net.

For Your Own Application you can create a dropdown that allows the user to select the chain they want to use. Use the SupportedEvmChains.SupportedChains property to populate the dropdown. This property is found in the project under Assets->MoralisWeb3ApiSdk->Moralis folder in the SupportedEvmChains.cs file.

Hope this helps.

Regards,

David

Much apreciated! thanks David

1 Like