Giter Site home page Giter Site logo

Comments (4)

k-karuna avatar k-karuna commented on July 20, 2024

@fraidev we have two versions of newtonsoft: for WebGL, and for others platforms. They are both identical. This separation was done after we encountered issues in Unity 2021.3.22+ versions, they have updated Newtonsoft dependency and after that there was conflicts between our SDK Newtonsoft.dll and Unity's one. So, we just renamed Newtonsoft.dll to TezosUnitySDK.Newtonsoft.Json.dll and this works fine, except WebGL bulds, Web builder did't see renamed dll, so our workaround is to use TezosUnitySDK.Newtonsoft.Json.dll for all platforms except Web, and Newtonsoft.dll only for Web.
So,please use corresponding dll for IOS (TezosUnitySDK.Newtonsoft.Json.dll)

from tezos-unity-sdk.

fraidev avatar fraidev commented on July 20, 2024

@fraidev we have two versions of newtonsoft: for WebGL, and for others platforms. They are both identical. This separation was done after we encountered issues in Unity 2021.3.22+ versions, they have updated Newtonsoft dependency and after that there was conflicts between our SDK Newtonsoft.dll and Unity's one. So, we just renamed Newtonsoft.dll to TezosUnitySDK.Newtonsoft.Json.dll and this works fine, except WebGL bulds, Web builder did't see renamed dll, so our workaround is to use TezosUnitySDK.Newtonsoft.Json.dll for all platforms except Web, and Newtonsoft.dll only for Web. So,please use corresponding dll for IOS (TezosUnitySDK.Newtonsoft.Json.dll)

I tried to disable Newtonsoft.dll and to enable TezosUnitySDK.Newtonsoft.Json.dll to IOS, but I got this error:

Exception: Failed running /Applications/Unity/Hub/Editor/2021.3.23f1/Unity.app/Contents/il2cpp/build/deploy/UnityLinker @"/Users/frai/workspace/tezos-unity-sdk-rpg-sample-game/Unity/Temp/StagingArea/Data/Managed/response.rsp"

stdout:
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Common/MissingMethodStubber.cs:line 178
   at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/AddUnresolvedStubsStep.cs:line 18
   at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/Marking/UnresolvedStubMarking.cs:line 96
   at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/UnityMarkStep.cs:line 207
   at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider, DependencyInfo& reason, IMemberDefinition sourceLocationMember) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 590
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 1446
   at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 1293
   at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 315
   at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 1159
   at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 204
   at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/UnityMarkStep.cs:line 34
   at Mono.Linker.Steps.MarkStep.Initialize() in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker.Steps/MarkStep.cs:line 194
   at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker.Steps/UnityMarkStep.cs:line 255
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityPipeline.cs:line 23
   at Mono.Linker.Pipeline.Process(LinkContext context) in /Users/bokken/build/output/unity/il2cpp/repos/monolinker/src/linker/Linker/Pipeline.cs:line 128
   at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityDriver.cs:line 125
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed) in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityDriver.cs:line 81
   at Unity.Linker.UnityDriver.RunDriver() in /Users/bokken/build/output/unity/il2cpp/UnityLinker/Linker/UnityDriver.cs:line 62
stderr:

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildUtils.cs:133)
UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildUtils.cs:91)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/AssemblyStripper.cs:156)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/AssemblyStripper.cs:147)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/AssemblyStripper.cs:233)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/AssemblyStripper.cs:168)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:617)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:279)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:932)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:755)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:695)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:45)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:49)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:28)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

Am I forgetting something?

from tezos-unity-sdk.

k-karuna avatar k-karuna commented on July 20, 2024

Oh, seems that issue i am talking about is related to Mono linker. So, i suggest to use Newtonsoft.dll for platforms that use Mono linker (WebGL, IOS) and use TezosUnitySDK.Newtonsoft.Json.dll for others.
Therefore i suggest to exclude IOS platrorm from TezosUnitySDK.Newtonsoft.Json.dll file as well as WebGL.

from tezos-unity-sdk.

fraidev avatar fraidev commented on July 20, 2024

Oh, seems that issue i am talking about is related to Mono linker. So, i suggest to use Newtonsoft.dll for platforms that use Mono linker (WebGL, IOS) and use TezosUnitySDK.Newtonsoft.Json.dll for others. Therefore i suggest to exclude IOS platrorm from TezosUnitySDK.Newtonsoft.Json.dll file as well as WebGL.

Ok, I kept the Newtonsoft.dll to iOS and I added a commit to exclude the iOS platform from TezosUnitySDK.Newtonsoft.Json.dll.

from tezos-unity-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.