Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared library between server and Unity client targeting .Net 3.5 #27

Closed
shlomiw opened this issue Mar 26, 2017 · 5 comments
Closed

Shared library between server and Unity client targeting .Net 3.5 #27

shlomiw opened this issue Mar 26, 2017 · 5 comments

Comments

@shlomiw
Copy link

shlomiw commented Mar 26, 2017

Hi,
We have a shared library for both server and Unity client which targets .net 3.5.
The nuget supports only 4.6.1 (.Net Standard 1.4), and there's the special Unity install package.

How can we use your library targeting .Net 3.5?
Thanks

@neuecc
Copy link
Member

neuecc commented Mar 26, 2017

I'm recommending source-code level sharing.
SharedProject or Reference as Link or new MSBuild(VS2017)'s wildcard reference etc.

This is sample of use sharedproject project structure.

  • SharedProject
    • Source codes of server-client shared
  • ServerProject
    • [SharedProject]
    • [MessagePack]
    • [MessagePack.UnityShims]
  • ClientDllProject
    • [SharedProject]
    • [MessagePack]
  • Unity
    • [Builded ClientDll]

@shlomiw
Copy link
Author

shlomiw commented Mar 26, 2017

Hi,

Thanks for the quick reply.
We want all the serialized classes to be in the SharedProject, so both the Server and the Unity client can use them. These classes needed to be with [MessagePackObject] attribute, so the shared project needs to have reference to MessagePack. Because of Unity we must target this shared project to 3.5.

Is it possible?

@neuecc
Copy link
Member

neuecc commented Mar 26, 2017

image

Shared Project is not require reference same assembly.

  • SharedProject(source code sharing)
    • Source codes of server-client shared
  • ServerProject(.NET 4.6)
    • [SharedProject]
    • [MessagePack]
    • [MessagePack.UnityShims]
  • ClientDllProject(.NET 3.5)
    • [SharedProject]
    • [MessagePack](not dll, use MessagePack.unitypackage's sourcecodes)
  • Unity
    • [Builded ClientDll]

@shlomiw
Copy link
Author

shlomiw commented Mar 26, 2017

Great, it works :)
Thanks

@edmand46
Copy link

image
I did as shown above but I got errors.

AArnott added a commit that referenced this issue Apr 17, 2019
Add support for IBufferWriter<byte>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants