Comments (6)
Why it wont work well?
from json.net.unity3d.
@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?
from json.net.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.
from json.net.unity3d.
Ok. I got the point. Instead of publishing new nuget package dedicated only for Unity3d, how about following scheme which my project is using?
- Use common
Newtonsoft.Json
for VS game project. - Output DLL from VS game project will be copied to Unity3D assets folder except
Newtonsoft.Json.Dll
because it doesn't support Unity3D.- In the meantime, reference to
Newtonsoft.Json.Dll
of output dll should be modified to strip out strong naming information. - You can do it simply by using sfk tool like
sfk.exe rep "DLLPATH" -pat -bin /0830ad4fe6b2a6aeed/000000000000000000/ -yes
(It helps to check how TrackableData handle this)
- In the meantime, reference to
- Place
Json.Net.Unity3D
package in Unity3D asset folder. (It has to be done at first time.) - Unity3D project works successfully because
Newtonsoft.Json
andJson.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.
from json.net.unity3d.
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.
from json.net.unity3d.
Thanks for generous understanding 😄
Still now, I think that the another nuget package is too specialized to keep it official.
from json.net.unity3d.
Related Issues (20)
- SerializationBinder and BindToName with Unity 2017 HOT 6
- What's the difference between jsonnet.lite and jsonnet package? HOT 1
- Unity 2017.1.2f1: Could not load assembly 'UnityEngine.CoreModule'
- Constructor on type System.ComponentModel.ReferenceConverter not found.
- Change in Unity Architecture
- Can Json.Net.Unity3D run with the .NET 2.0 subset? HOT 1
- OrderedDictionary serialization
- Deserialization error in XCode for iOS build: MissingMethodException HOT 1
- ios Issue on deserialization of System.Nullable<long>[] HOT 2
- Question: Version for Unity 2017.1?
- Higt memory allocate when first Deserialized
- Getting Unable to find a constructor error in WebGL HOT 1
- JObject ?
- JObject ? HOT 1
- il2cpp exception for JArray.Parse on UWP
- Circular reference when serializing Vectors
- No parameterless constructor defined for 'Newtonsoft.Json.Converters.StringEnumConverter' HOT 1
- serializeObject bytes.
- JSchema does not exist.
- Cities Skylines modding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json.net.unity3d.