Search Unity

SignalR - Question..

Discussion in 'General Discussion' started by zumwalt, May 5, 2015.

  1. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    I did a search on the forums and came up with zip, I haven't been on the forums in a few years because of life, but now getting back into Unity since this latest uber release has what I have been wanting since 1.6x :) (so ya I am old LOL and this latest release is just uber), so has anyone implemented SignalR into there Unity game yet?

    If so, can you please provide a reference to sample as to how you set it up?
    If not, no biggie, I find ways to twist what I need into and out of Unity, just haven't attempted this yet and it looks really fun.

    Best regards,
    Zumwalt
     
  2. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    I know someone did at one point because they used my asset as part of it, but that was like 2 years ago and I for the life of me couldn't tell you who it was anymore or how they got it working. You might want to try downloading the source and building it to 3.5 just to see what happens:
    https://github.com/SignalR/SignalR

    There are also client libraries on NuGet, so create a class library project in VS that targets .NET 3.5 and then pull in the SignalR NuGet package and you should get the .NET 3.5 version. Then drop those assemblies into Unity and see what happens. My guess is you'll need to tweak and recompile the source as there are some things that just won't be supported. But it appears that someone has already done it:

    https://github.com/gromchen/uSignalR
     
  3. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Many thanks for the tip, I haven't kept upon the Mono support in Unity so wasn't sure if they got up to 3.5 yet from 2.0, most stuff I have been building is with MC++ into Unity library bridges. Was debating going down the iFrame with Json + more javascripting to see if I could do the hooks, that or simply build my own .Net class library to do the interface through a server component, still in the sketching phase. This gives me hope that is can be done without too many days of effort.
     
    Dustin-Horne likes this.
  4. mestrong24

    mestrong24

    Joined:
    Mar 12, 2016
    Posts:
    1
    @zumwalt - what did you end up creating for your p2p solution? i found SignalR has a client in 2.0 so that could be in the unity, but the hub (server) needs higher asp.net framework, I think 4.0.

    the iFrame with json - maybe peerjs.com could be the solution?
     
  5. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    There should be .net 3.5 version of the hub out there somewhere but doesn't your web server support at least 4.0?