Skip to content

Commit c6e7165

Browse files
committed
[Readme] External Dependency Manager Tip
1 parent 36ded7e commit c6e7165

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Note: The Newtonsoft DLL is included as part of the Unity Package, feel free to
3333
# Build
3434

3535
## WebGL
36+
3637
- Open your `Build settings`, select `WebGL` as the target platform.
3738
- Open `Player settings` > `Resolution and Presentation` and under `WebGLTemplate` choose `Thirdweb`.
3839
- Save and click `Build and Run` to test out your game in a browser.
@@ -42,11 +43,13 @@ If you're uploading your build, set `Compression Format` to `Disabled` in `Playe
4243
Note that in order to communicate with the SDK on WebGL, you need to `Build and run` your project so it runs in a browser context.
4344

4445
## Other Platforms
46+
4547
- Requires a ThirdwebManager prefab in your scene.
4648
- Use IL2CPP over Mono when possible in the Player Settings.
4749
- Use Smaller (faster) Builds in the Build Settings.
4850
- Using the SDK in the editor (pressing Play) is an accurate reflection of what you can expect to see on native platforms.
4951
- If using prefabs, use Prefab_ConnectWalletNative instead of Prefab_ConnectWallet.
52+
- If building to mobile and running into RPC issues, it is best to run Force Resolve from the Assets menu > External Dependency Manager > Android Resolver > Force Resolve for example.
5053

5154
# Usage
5255

@@ -90,11 +93,13 @@ The `Examples` folder contains a demo scene using our user-friendly prefabs, che
9093
All Prefabs require the [ThirdwebManager](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/ThirdwebManager.cs) prefab to get the SDK Instance, drag and drop it into your scene and select the networks you want to support from the Inspector.
9194

9295
[Connect Wallet](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_ConnectWallet.cs) - All-in-one drag & drop wallet supporting multiple wallet providers, network switching, balance displaying and more!
96+
9397
- Drag and drop it into your scene and select the wallet providers you want to support from the Inspector.
9498
- You may also choose whether you want to activate the Network Switching feature (leave unchecked if your app only requires one network).
9599
- You can add callbacks from the inspector for when the wallet is connected, disconnected, fails to connect or disconnect.
96100

97-
[Connect Wallet Native](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_ConnectWalletNative.cs)
101+
[Connect Wallet Native](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_ConnectWalletNative.cs)
102+
98103
- All-in-one drag & drop wallet supporting WalletConnect and Device Wallets (with or without passwords)
99104
- Drag and drop it into your scene and select the wallet options you want to provide (recommend using only one).
100105
- For device wallets, exporting will open the local encrypted keystore file on Standalone platforms (Application.persistentDataPath/account.json)
@@ -104,6 +109,7 @@ All Prefabs require the [ThirdwebManager](https://github.com/thirdweb-dev/unity-
104109
- You can add callbacks from the inspector for when the wallet is connected, disconnected, fails to connect or disconnect.
105110

106111
[NFT Loader](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_NFTLoader.cs) - Standalone drag & drop grid/scroll view of NFTs you ask it to display!
112+
107113
- Go to the prefab's Settings in the Inspector.
108114
- Load specific NFTs with token ID.
109115
- Load a specific range of NFTs.
@@ -112,37 +118,43 @@ All Prefabs require the [ThirdwebManager](https://github.com/thirdweb-dev/unity-
112118
- Customize the prefab's ScrollView and Content gameobjects if you want your content to behave differently.
113119

114120
[NFT](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_NFT.cs) - Displays an NFT by calling LoadNFT through script!
121+
115122
- Instantiate this Prefab through script.
116123
- Get its Prefab_NFT component.
117124
- Call the LoadNFT function and pass it your NFT struct to display your fetched NFT's images automatically.
118125
- Customize the prefab to add text/decorations and customize LoadNFT to use your NFT's metadata if you want to populate that text.
126+
119127
```csharp
120128
NFT nft = await contract.ERC721.Get(0);
121129
Prefab_NFT nftPrefabScript = Instantiate(nftPrefab);
122130
nftPrefabScript.LoadNFT(nft);
123131
```
124132

125133
[Events](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_Events.cs) - Fetch and manipulate Contract Events with a simple API!
134+
126135
- Get specific events from any contract.
127136
- Get all events from any contract.
128137
- Event listener support with callback actions.
129138
- Optional query filters.
130139

131140
[Reading](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_Reading.cs) - Reading from a contract!
141+
132142
- Fetch ERC20 Token(s).
133143
- Fetch ERC721 NFT(s).
134144
- Fetch ERC1155 NFT(s).
135145
- Fetch Marketplace Listing(s).
136146
- Fetch Pack contents.
137147

138148
[Writing](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_Writing.cs) - Writing to a contract!
149+
139150
- Mint ERC20 Token(s).
140151
- Mint ERC721 NFT(s).
141152
- Mint ERC1155 NFT(s).
142153
- Buy Marketplace Listing(s).
143154
- Buy a Pack.
144155

145156
[Miscellaneous](https://github.com/thirdweb-dev/unity-sdk/blob/main/Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_Miscellaneous.cs) - More examples!
157+
146158
- Get (Native) Balance.
147159
- Custom Contract Read/Write Calls.
148160
- Authentication.

0 commit comments

Comments
 (0)