EricVoll / ros-sharp

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particular Unity3D
Apache License 2.0
36 stars 7 forks source link

Providing Newtonsoft AOT dlls not required for newer Unity versions #17

Open MarioGini opened 3 years ago

MarioGini commented 3 years ago

Hi Eric :)

After trying to update the Unity version of the sample app to 2020.3.12f1 (from 2020.3.8f1, so tiny update), I received build errors because the Newtonsoft.Json dlls are defined multiple times. The reason is that that update automatically pulls in the package ´"com.unity.nuget.newtonsoft-json": "2.0.0"´, which based on my small Unity experience seems to be a dependency of pretty much any Unity project older than 2020.3.8f1 (In this case it was a dependency of the version control package which I think is included by default).

HOWEVER the good news is that the 2.0.0 version of that package supports AOT, so the resolution is to just delete your own Netwonsoft dlls and use the Unity ones. So I would propose to update the sample app to a slightly newer Unity version and then remove the Assets/Plugins folder with all its content. And additionally, add some documentation about how to check whether your Unity project requires your own Newtonsoft AOT dlls (based on whether the Unity v2.0.0 version is already an included package or not)

EricVoll commented 3 years ago

Hi @MarioGini thanks for the info! I'll play around with it this afternoon and will probably do it as you suggested :) Thanks!

verena-roehrl commented 2 years ago

I can confirm this: With "com.unity.nuget.newtonsoft-json:2.0.0 deployment of ROS# on the Hololens works without the Assets/Plugins folder.

Thanks for the hint!

EricVoll commented 2 years ago

Thanks for the confirmation.