Closed alexbestul closed 8 years ago
Why it wont work well?
@alexbestul Wow! you mean that your project is using nuget
package system for Unity project? Could you tell me more detail and packages which you're using?
Basically nuget
doesn't support Unity3D and there is no target moniker for Unity3D. (Ref: Targetframeworks) so how can i make a package for Unity3D?
It's not as fancy as you're imagining, I'm afraid.
We simply use Visual Studio to compile our game's C# source into DLLs, and then drop those DLLs into the Unity project's Assets folder. We add dependencies to the csproj using Visual Studio's standard mechanisms (either as direct DLL references or through NuGet), and then make sure that those DLLs get copied into the Unity project as well.
You are correct that NuGet doesn't allow us to target a package specifically for Unity, but simply targeting .NET 2.0 or .NET 3.5 should be sufficient.
The NuGet package would contain exactly the same DLL that the UnityPackage contains, just packaged and distributed differently.
Ok. I got the point. Instead of publishing new nuget package dedicated only for Unity3d, how about following scheme which my project is using?
Newtonsoft.Json
for VS game project.Newtonsoft.Json.Dll
because it doesn't support Unity3D.
Newtonsoft.Json.Dll
of output dll should be modified to strip out strong naming information.sfk.exe rep "DLLPATH" -pat -bin /0830ad4fe6b2a6aeed/000000000000000000/ -yes
(It helps to check how TrackableData handle this)Json.Net.Unity3D
package in Unity3D asset folder. (It has to be done at first time.)Newtonsoft.Json
and Json.Net.Unity3D
has same DLL name and no strong naming information.It requires no another nuget package and makes game project DLL run under normal .NET environment.
Thanks for your feedback. I can see how that approach would work, but I would still prefer to have a NuGet package, so we can follow our existing workflow.
If you aren't interested in maintaining an official package, then no worries. I completely understand not wanting to take on that burden. We'll find a way to make things work that fits our needs, and you can close this issue if you'd like.
Thanks for generous understanding :smile: Still now, I think that the another nuget package is too specialized to keep it official.
Would you be willing to maintain a NuGet package for this project?
My team compiles our Unity projects using Visual Studio, so the unitypackage distribution mechanism doesn't work well for us. We are able to unpack the necessary DLLs from the unitypackage, or compile from source, but being able to get an official package from NuGet would be ideal.
Please let me know if you're not familiar with NuGet. I can provide more information/instructions/help/pull requests.