Skip to content

Commit 7e0b3d8

Browse files
committed
cleanup scene / fix nft loader extra spawns
1 parent da1976f commit 7e0b3d8

File tree

2 files changed

+107
-2
lines changed

2 files changed

+107
-2
lines changed

Assets/Thirdweb/Examples/Scenes/Scene_Prefabs.unity

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,10 +1351,114 @@ PrefabInstance:
13511351
m_Modification:
13521352
m_TransformParent: {fileID: 574059470}
13531353
m_Modifications:
1354+
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1355+
propertyPath: m_AnchorMax.y
1356+
value: 0
1357+
objectReference: {fileID: 0}
1358+
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1359+
propertyPath: m_AnchorMin.y
1360+
value: 0
1361+
objectReference: {fileID: 0}
1362+
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1363+
propertyPath: m_SizeDelta.x
1364+
value: 0
1365+
objectReference: {fileID: 0}
1366+
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1367+
propertyPath: m_AnchoredPosition.x
1368+
value: 0
1369+
objectReference: {fileID: 0}
1370+
- target: {fileID: 351517270, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1371+
propertyPath: m_AnchoredPosition.y
1372+
value: 0
1373+
objectReference: {fileID: 0}
1374+
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1375+
propertyPath: m_AnchorMax.y
1376+
value: 0
1377+
objectReference: {fileID: 0}
1378+
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1379+
propertyPath: m_AnchorMin.y
1380+
value: 0
1381+
objectReference: {fileID: 0}
1382+
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1383+
propertyPath: m_SizeDelta.x
1384+
value: 0
1385+
objectReference: {fileID: 0}
1386+
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1387+
propertyPath: m_AnchoredPosition.x
1388+
value: 0
1389+
objectReference: {fileID: 0}
1390+
- target: {fileID: 679192014, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1391+
propertyPath: m_AnchoredPosition.y
1392+
value: 0
1393+
objectReference: {fileID: 0}
1394+
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1395+
propertyPath: m_AnchorMax.y
1396+
value: 0
1397+
objectReference: {fileID: 0}
1398+
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1399+
propertyPath: m_AnchorMin.y
1400+
value: 0
1401+
objectReference: {fileID: 0}
1402+
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1403+
propertyPath: m_SizeDelta.x
1404+
value: 0
1405+
objectReference: {fileID: 0}
1406+
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1407+
propertyPath: m_AnchoredPosition.x
1408+
value: 0
1409+
objectReference: {fileID: 0}
1410+
- target: {fileID: 1045367076, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1411+
propertyPath: m_AnchoredPosition.y
1412+
value: 0
1413+
objectReference: {fileID: 0}
13541414
- target: {fileID: 696252699284340127, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
13551415
propertyPath: m_Name
13561416
value: 'Prefab_ConnectWallet '
13571417
objectReference: {fileID: 0}
1418+
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1419+
propertyPath: m_AnchorMax.y
1420+
value: 0
1421+
objectReference: {fileID: 0}
1422+
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1423+
propertyPath: m_AnchorMin.y
1424+
value: 0
1425+
objectReference: {fileID: 0}
1426+
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1427+
propertyPath: m_SizeDelta.x
1428+
value: 0
1429+
objectReference: {fileID: 0}
1430+
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1431+
propertyPath: m_AnchoredPosition.x
1432+
value: 0
1433+
objectReference: {fileID: 0}
1434+
- target: {fileID: 1335404546759128317, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1435+
propertyPath: m_AnchoredPosition.y
1436+
value: 0
1437+
objectReference: {fileID: 0}
1438+
- target: {fileID: 1335404547797609897, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1439+
propertyPath: m_SizeDelta.y
1440+
value: 0
1441+
objectReference: {fileID: 0}
1442+
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1443+
propertyPath: m_AnchorMax.y
1444+
value: 0
1445+
objectReference: {fileID: 0}
1446+
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1447+
propertyPath: m_AnchorMin.y
1448+
value: 0
1449+
objectReference: {fileID: 0}
1450+
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1451+
propertyPath: m_SizeDelta.x
1452+
value: 0
1453+
objectReference: {fileID: 0}
1454+
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1455+
propertyPath: m_AnchoredPosition.x
1456+
value: 0
1457+
objectReference: {fileID: 0}
1458+
- target: {fileID: 6243171688188928066, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
1459+
propertyPath: m_AnchoredPosition.y
1460+
value: 0
1461+
objectReference: {fileID: 0}
13581462
- target: {fileID: 6539300962087038060, guid: a6218c0a90161f349bc6bc87fbc624da, type: 3}
13591463
propertyPath: m_Pivot.x
13601464
value: 1

Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_NFTLoader.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ public async void LoadNFTs()
126126

127127
foreach (NFT nft in nftsToLoad)
128128
{
129+
if (!Application.isPlaying)
130+
return;
131+
129132
Prefab_NFT nftPrefabScript = Instantiate(nftPrefab, contentParent);
130133
nftPrefabScript.LoadNFT(nft);
131-
// Potentially wait a little here if you are loading a lot without a private IPFS gateway
132-
// Could also put this foreach in a separate Coroutine to avoid async object spawning
133134
}
134135

135136
loadingPanel.SetActive(false);

0 commit comments

Comments
 (0)