Skip to content

Commit

Permalink
cleanup scene / fix nft loader extra spawns
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed May 15, 2023
1 parent da1976f commit 7e0b3d8
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 2 deletions.
104 changes: 104 additions & 0 deletions Assets/Thirdweb/Examples/Scenes/Scene_Prefabs.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1351,10 +1351,114 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 574059470}
m_Modifications:
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 696252699284340127, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_Name
value: 'Prefab_ConnectWallet '
objectReference: {fileID: 0}
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1335404547797609897, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6539300962087038060, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
propertyPath: m_Pivot.x
value: 1
Expand Down
5 changes: 3 additions & 2 deletions Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_NFTLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ public async void LoadNFTs()

foreach (NFT nft in nftsToLoad)
{
if (!Application.isPlaying)
return;

Prefab_NFT nftPrefabScript = Instantiate(nftPrefab, contentParent);
nftPrefabScript.LoadNFT(nft);
// Potentially wait a little here if you are loading a lot without a private IPFS gateway
// Could also put this foreach in a separate Coroutine to avoid async object spawning
}

loadingPanel.SetActive(false);
Expand Down

0 comments on commit 7e0b3d8

Please sign in to comment.