Skip to content

Commit bab0eca

Browse files
committed
Update Readme for Newtonsoft Issue
1 parent be2df2e commit bab0eca

30 files changed

+15
-516
lines changed

Assets/MoralisWeb3ApiSdk/Moralis/Moralis.SolanaApi/Client/ApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void AddDefaultHeader(string key, string value)
167167
/// <returns>Escaped string.</returns>
168168
public string EscapeString(string str)
169169
{
170-
#if MORALIS_UNITY
170+
#if UNITY_2019_1_OR_NEWER
171171
return UnityEngine.Networking.UnityWebRequest.EscapeURL(str);
172172
#else
173173
return HttpUtility.UrlEncode(str);

Assets/MoralisWeb3ApiSdk/Moralis/Moralis.Web3Api/Client/ApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public void AddDefaultHeader(string key, string value)
174174
/// <returns>Escaped string.</returns>
175175
public string EscapeString(string str)
176176
{
177-
#if MORALIS_UNITY
177+
#if UNITY_2019_1_OR_NEWER
178178
return UnityEngine.Networking.UnityWebRequest.EscapeURL(str);
179179
#else
180180
return HttpUtility.UrlEncode(str);

Assets/csc.rsp

Lines changed: 0 additions & 1 deletion
This file was deleted.

Assets/csc.rsp.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

Packages/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"dependencies": {
33
"com.unity.collab-proxy": "1.15.7",
4+
"com.unity.nuget.newtonsoft.json": "2.0.0",
45
"com.unity.ide.rider": "2.0.7",
56
"com.unity.ide.visualstudio": "2.0.12",
67
"com.unity.ide.vscode": "1.2.4",

ProjectSettings/PackageManagerSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MonoBehaviour:
1313
m_Name:
1414
m_EditorClassIdentifier:
1515
m_EnablePreviewPackages: 0
16-
m_EnablePackageDependencies: 0
16+
m_EnablePackageDependencies: 1
1717
m_AdvancedSettingsExpanded: 1
1818
m_ScopedRegistriesSettingsExpanded: 1
1919
oneTimeWarningShown: 0

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ If you need help with setting up the boilerplate or have other questions - don't
3333
- When the project opens, open Edit->Preferences->External Tools (on MAC this is Unity->Preferences->External Tools) and make sure "Script Editor" is set to your installed Visual Studio instance. IMPORTANT: This step must be done before importing the package.
3434
- Navigate to the folder you downloaded the package to. Drag and drop the package into the Unity project.
3535
![Demo](https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate/blob/main/gifs/add.gif)
36-
36+
- If you receive an error regarding **Newtonsoft**, follow these steps:
37+
- In Right click on Packages and select _"Show In Explorer"_.
38+
![Fix Newtonsoft 1](https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate/blob/main/gifs/add_ns_a.gif)
39+
- Open the _Packages_ folder
40+
![Fix Newtonsoft 2](https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate/blob/main/gifs/add_ns_b.gif)
41+
- Edit the _manifest.json_ file
42+
![Fix Newtonsoft 3](https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate/blob/main/gifs/add_ns_b1.gif)
43+
- Add an entry for ```"com.unity.nuget.newtonsoft.json": "2.0.0",```
44+
![Fix Newtonsoft 4](https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate/blob/main/gifs/add_ns_c.gif)
45+
- Save the file and return to Unity, it should auto-load the Newtonsoft package.
3746
- Open MoralisWeb3ApiSdk->Example and double-click on the DemoScene object.
3847
- In the "Hierachy" panel under DemoScene select "MoralisSetup".
3948
- In the "Inspector" section find the sub-section titled "MoralisController".
@@ -63,7 +72,7 @@ If you need help with setting up the boilerplate or have other questions - don't
6372

6473
This boilerplate project has been tested with the following Unity3D Releases:
6574
1. 2020.2
66-
2. 2020.3.26 (latest)
75+
2. 2020.3.31 (latest)
6776
3. 2021.2.5
6877

6978
# 🧭 Table of contents

app.config

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
<configuration>
33
<runtime>
44
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5-
<dependentAssembly>
6-
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
7-
<bindingRedirect oldVersion="0.0.0.0-106.13.0.0" newVersion="106.13.0.0" />
8-
</dependentAssembly>
95
<dependentAssembly>
106
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
117
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />

gifs/add_ns_a.gif

16.6 KB
Loading

gifs/add_ns_b.gif

25.4 KB
Loading

0 commit comments

Comments
 (0)