question

nforss avatar image
nforss asked

Using the Thunderhead server SDK with custom Json handling?

I'm just setting up a multiplayer server using the ThunderHead NuGet (com.playfab.csharpgsdk), but am running into problems. We have a game engine library which is shared between client and server, and since we're using Unity, we can't use the vanilla NewtonSoft.Json, since it doesn't work well with iOS. So we're using Json.Net.Unity3D instead, but now the Thunderhead NuGet package has a dependency on NewtonSoft.Json, and this causes an error during runtime.

Is there a way to use the ThunderHead SDK with Json.Net.Unity3D instead? Or really any custom Json handler? I guess I could download the source and build it myself, but if there's a more maintanable solution I'd be happy hear about it. The SDK is being updated a lot, after all.

I also posted a question concerning the same problem, but from a slightly different angle, on StackOverflow.

sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

GSDK (Thunderhead server SDK) is not open source, I'm afraid you can not download the source and build it by yourself. For your scenario, I'd think you can only reuse the code in server instead of referencing the whole class library. You can copy all the code in your class library into server and only use NewtonSoft.Json. As this is running in server, NewtonSoft.Json should be able to work.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nforss avatar image nforss commented ·

Thanks for your input. GSDK not being open source explains why I'm having a hard time locating the source code.

Copying is not a real option, since it is our game engine and constantly evolving. Keeping two versions in sync would be too much of a hassle. Now, if I can find a way to automatically switch out the Json library on build, depending on if the library is built for client or server side, that would be a solution, however.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ nforss commented ·

Maybe you can use something like git submodule to maintain you code. This sub module will only contain codes and in server/client project, you can specify which nuget package you want to use.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.