Skip to content

v1.1.1

Compare
Choose a tag to compare
@joaquim-verges joaquim-verges released this 02 Feb 03:05
a4b2dfe

NEW - NFT and NFT Loader Prefabs!

Introducing the Prefab_NFT and Prefab_NFTLoader prefabs - instantiate an NFT and load it through script with the former, or drag and drop a fully functional and customizable ScrollView (Grid Layout) and set it up to display whatever NFTs you want from the Inspector!

Changelog:

Prefab_NFT
Displays an NFT by calling LoadNFT through script

  • Instantiate this Prefab
  • Get its Prefab_NFT component
  • Call the LoadNFT function and pass it your NFT struct to display your fetched NFT's images automatically
  • Customize the prefab to add text/decorations and customize LoadNFT to use your NFT's metadata if you want to populate that text
NFT nft = await contract.ERC721.Get(0);
Prefab_NFT nftPrefabScript = Instantiate(nftPrefab);
nftPrefabScript.LoadNFT(nft);

Prefab_NFTLoader
Standalone Drag & Drop grid/scroll view of NFTs you ask it to display

  • Go to the prefab's Settings in the Inspector
  • Load specific NFTs with token ID
  • Load a specific range of NFTs
  • Load NFTs owned by a specific wallet
  • Or any combination of the above - they will all be displayed automatically in a grid view with vertical scroll!
  • Customize the prefab's ScrollView and Content gameobjects if you want your content to behave differently.

Screen Shot 2023-02-01 at 6 56 56 PM

Prefab_ConnectWallet

  • Removed custom logging function for simplicity
  • References ThirdwebManager to get the SDK now

ThirdwebManager
Minimal prefab added into the scene for convenience and cross-script reference of the SDK when using multiple prefabs.

  • Drag and drop into your scene and input the chain you'd like it to use from the Inspector
  • Reference the SDK in your scripts with ThirdwebManager.Instance.SDK
  • Get the chain ID if needed with ThirdwebManager.Instance.GetChainID()