Login Example
This section will illustrate how to build the scenes to login and load a player's NFT assets.
NOTE In order to use the Cronos Network, you will have to add the Network ID and Name in the network.js file in the Assets/WebGLTemplates/Web3GL-2020x/
folder.
Import NFT
To ensure that the NFT loads conditionally after successfully connecting to a wallet, you can update the ImportNFTTextureCronos.cs
file with the content below.
If you are using IPFS please replace IPFS with an HTTPS call as seen below
Replace IPFS
Build the Scenes
To build the Game Login example, you need to go to File/Build Settings
and select your WebGL, IOS or Androi Build Settings. In this example, we will build using the WebGL method. To build with the DefiWallet option, you will have to select the Cronos DefiWallet Template in the Player -> Resolution and Presentation settings
NOTE Make sure to select the Cronos Defi Wallet Template in the Player -> Resolution and Presentation settings.
On successful completion, you will be able to log in to your DefiConnect wallet. The scene will load any textures from NFT assets you own on successful login.
Last updated