trilitech / tezos-unity-sdk

Tezos Unity SDK for developers. Discover the future of Web3 gaming.
https://tezos.com/unity
MIT License
24 stars 12 forks source link

Error: Standalone IL2CPP build fails #102

Closed umutkutlu closed 1 year ago

umutkutlu commented 1 year ago

Definition

Builds fail with the following error: Fatal error in Unity CIL Linker Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'

OS: Windows 10 Unity version: 2021.3.23f1 SDK version: 1.5.1 Target platform: Windows Standalone

Steps To Reproduce

  1. Create a new unity project
  2. Import the sdk v1.5.1 from package manager
  3. Install the sample
  4. Add Demo Example scene to Build Settings
  5. Change the Scripting Backend to IL2CPP by navigating to Edit/Project Settings/Player/Other Settings
  6. Wait for the project to recompile and attempt to Build it

Possible Solution

Newtonsoft.Json.dll v13.0.0 does not support IL2CPP, changing current one to jilleJr's Newtonsoft.Json v13.0.1 should fix the issue.

umutkutlu commented 1 year ago

I just disabled TezosUnitySDK.Newtonsoft.Json.dll and Newtonsoft.Json.dll, waiting for your confirmation to remove @k-karuna @m-kus . Added jilleJr's Newtonsoft.Json v13.0.1, fixes the issue.

k-karuna commented 1 year ago

I checked editor, win standalone IL2CPP and WebGL, everything works fine on both Unity 2021.3.21 and 2022.3.4