Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NAT Traversal - Automatic port forwarding, punch-through, and more!

Discussion in 'Assets and Asset Store' started by thegreatzebadiah, Apr 5, 2016.

  1. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    @Doghelmer Hurm. Are you sure you override-ed the Awake in the previous fix? Do you have a callback for the OnMatchJoined anywhere that might be gumming up the works? Do you have the right version of the plugin? There was a change from 5.3.x to 5.4.x which breaks some of the callbacks (this was actually a Unity networking API change). I don't think i've seen this specific error before, so that's all i got. Good luck!
     
  2. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Hi everyone, I'm working on the latest wave of updates now including support for Unity 5.5.

    In the meantime though if you are using Unity 5.5 and getting the "ListMatchResponse is inaccessible due to its protection level" error while using the ExampleNetworkManager you can fix it by changing all instances of
    Code (CSharp):
    1. #if UNITY_5_4
    to
    Code (CSharp):
    1. #if UNITY_5_5
     
    Last edited: Dec 20, 2016
  3. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    120
    I recently ran into another small snag. When I use the following command to start a game:
    Code (csharp):
    1. StartHostAll(matchName, (uint)matchSize, true, matchPassword, 0, 0, OnMatchCreate);
    ...the game appears to be listed on the matches list for about 30 seconds before completely disappearing. However, this does not occur when I use the following command:
    Code (csharp):
    1. StartHostAll(matchName, (uint)matchSize);
    Any ideas for why this might be occurring?
     
  4. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    Does your "OnMatchCreate" callback call the base method?
     
  5. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Yeah, I think @Jos-Yule is on the right track. If the match is created but the server doesn't actually start listening then the match will eventually be automatically removed from the list, which is what seems to be happening. The plugin does that step in OnMatchCreate so if you're overriding it make sure to call the base bethod.
     
  6. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    120
    Aaaand that did it. Same basic issue as before, thanks again.

    I wasn't able to fix that last null reference exception error I posted -- but oddly, it only occurs when I'm using the standard HUD, not when I'm using my own interface I created. So it's not a big deal, just wish I knew what the cause was. Haven't been able to figure out what I'm doing differently...
     
  7. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @Doghelmer by standard HUD do you mean the NetworkManagerHUD component or just the gui stuff included in the ExampleNetworkManager? If it's the NetworkManagerHUD there were a couple of issues that cropped up that broke compatibility with that but they are already fixed and will be included in the next update that I'm putting together now.

    If you just meant the default gui interface in the ExampleScene then I'm not sure what could be causing that null reference exception. If you'd like though you can email me your project to the support email on the asset store page and I can take a look.
     
  8. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    I just had some thoughts related to this. I think the main difference here is that when using unet matchmaking more connection info is being used (specifically the internal/external ipv6 addresses). If you go back to your custom matchmaking system you should try including the ipv6 addresses in the call to StartClientAll and see if you're able to connect to the windows computer. You can get them using the method getLocalIPv6() and the property externalIPv6 on the NetworkManager.
     
  9. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    It seems like you've got the right idea. Does it output any error messages when it fails? If you wait a long time does it time out? You may just be running into one of the router combinations where punch-through isn't possible. You may get better results by including the ipv6 addresses with the other connection info and passing them into StartClientAll

    Everything should be handled automatically.

    If you override OnHolePunchedClient or OnHolePunchedServer make sure to call the base methods since that is where the host is started and the client connected
     
    Last edited: Dec 21, 2016
  10. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Thanks for reporting this, the exception will be properly handled in the next update.
     
  11. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @Jos-Yule I've been trying like hell to replicate your issues but I just can't get any of them to happen. I'm not seeing the double online scene loading and even if I spawn the player using ClientScene.readyConnection everything seems to be fine. I connect and disconnect repeatedly and can't get that null reference error or the "host id out of bounds". I'm assuming you don't get these problems in the Example scene? If you could send me a project that produces the error it would really help me narrow it down. It definitely does seem like there's something that's not getting reset when disconnecting but I'm just not sure what it could be.

    Yeah, that should be all you have to do. You must be doing something in your project that I did not anticipate :)
     
  12. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    120
    I was referring to the NetworkManagerHUD.

    I'm actually going to be releasing the first multiplayer-enabled edition of my game either Wednesday or Thursday, and I'm pretty much scrambling to get this working properly (or alternatively just use the UNet matchmaking as-is, but I'd prefer not to do that), so apologies for not investigating these things further before asking here, but anyways, I have two remaining issues at the moment:

    Issue #1
    When I exit a game as a client, and then attempt to rejoin the game, I receive the following error:
    Code (csharp):
    1.  
    2. NATTraversal.NetworkManager.StartClientAll (System.String hostExternalIP, System.String hostInternalIP, UInt64 hostGUID, NetworkID matchID, System.String hostExternalIPv6, System.String hostInternalIPv6, UnityEngine.Networking.Match.DataResponseDelegate`1 joinMatchCallback, System.String matchPassword, Int32 eloScore, Int32 requestDomain, Boolean matchAlreadyJoined) (at E:/_Noble Whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NetworkManager.cs:481)
    3.  
    4. NATTraversal.NetworkManager.StartClientAll (UnityEngine.Networking.Match.MatchInfoSnapshot match, UnityEngine.Networking.Match.DataResponseDelegate`1 callback, System.String matchPassword, Int32 eloScore, Int32 requestDomain, Boolean matchAlreadyJoined) (at E:/_Noble Whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NetworkManager.cs:401)
    5.  
    6. NetworkManagerExtra.JoinMatch (UnityEngine.Networking.Match.MatchInfoSnapshot match, System.String myPassword) (at Assets/Scripts/NetworkManagerExtra.cs:385)
    Issue #2
    When my server calls for a scene change, the scene does not change on the client. Like I said, I haven't done much investigating to this point, but let me know if this sounds at all familiar. No errors, just no scene change on client, followed by an eventual timeout disconnect.
     
  13. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @Jos-Yule I just realized a possible source of your problem. You should make sure that when you call StopClient or StopHost you are calling it on an instance of NetworkManager that is properly cast to either NATTraversal.NetworkManager or your custom class that extends from that. If you are calling it on NetworkManager.singleton without casting it's going to call the wrong method. This has to do with the fact that StopHost and StopClient are not declared virtual in unity's version of NetworkManager so I can't override them how I would like and instead had to replace them via the "new" keyword which unfortunately has this weird quirk.
     
  14. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    This is related to the NetworkManagerHUD issues and will be fixed shortly. If you email me I can get you the update as soon as I've got it packaged.

    Doesn't seem familiar sorry. I've got no problem with clients changing to the online scene when using the ExampleNetworkManager at least. See if you can figure out what you're doing differently from that.
     
  15. Doghelmer

    Doghelmer

    Joined:
    Aug 30, 2014
    Posts:
    120
    Just sent you a DM about the next version.

    In regards to the scene change issue -- Could the fact that my online scene and offline scene are the same cause a potential problem? I basically only use one scene for every scene since a lot of the game is procedurally generated: "MainGame". So when I switch scenes, I just change to another "MainGame". I am changing the scene on the server using the following line in my extended NetworkManager:
    ServerChangeScene("MainGame");
    No problem with that, right?
     
    Last edited: Dec 21, 2016
  16. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Another +1 for mobile support (especially Android) please! :)
     
  17. Jos-Yule

    Jos-Yule

    Joined:
    Sep 17, 2012
    Posts:
    292
    This the first time i've seen this one. Happened on a Host. NOTE i've manually transcribed this error from the debug/development console so i may have not gotten all the characters exactly right, but i did get the line numbers correct.

    Code (CSharp):
    1. maximum hosts cannot exceed {16}
    2. UnityEngine.Networking.NetworkServerSimple.Listen(int32, HostTopology)
    3. NATTraversal.NetworkManager.OnHolePunchedServer(int32, Uint64) (at E:/_noble whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NetworkManager.cs:1030)
    4. NATTraversal.NATHelper.listenForPunchthrought(Packet) (at E:/_noble whale/NAT Traversal Stuff/NAT Traversal DLL/NATTraversalForUNET/NATHelper.cs:762)
    5. NATTraversal.<messageLoop>d__44:MoveNext()
     
  18. TubooBokBok

    TubooBokBok

    Joined:
    Mar 2, 2014
    Posts:
    30
    Hello,

    I have just downloaded this asset, and have uncounted some problems when using the example scene. I have not changed any settings from the package downloaded. These are the log messages I receive after clicking the "Host" button:

    upload_2016-12-21_17-54-44.png

    I have tried hosting on two different computers, one version 5.5.0 the other 5.3. On both computers I got the same error.

    Do you know what is causing this, and how I can fix it?

    Thanks.
     
  19. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @TubooBokBok I see two separate issues here. The first is the port mapping failing. This may just be because your router doesn't have port mapping enabled or doesn't support port mapping, or because you are not behind a router at all. This may or may not be a big deal. Port forwarding is just one of the tools the plugin tries to use to make a connection possible, so port forwarding could fail but connecting may still work.

    The other more serious issue is that the match could not be created. This is usually just because you haven't linked your project to unity's online services so that you can use the matchmaking. https://developer.cloud.unity3d.com/projects/

    Hopefully that helps, if not you can hit me up at the support email on the asset store page and I can try and get you some more direct help.
     
    Last edited: Dec 21, 2016
  20. TubooBokBok

    TubooBokBok

    Joined:
    Mar 2, 2014
    Posts:
    30
    Thank you very much for the quick response. I had not linked my project with the online services.
     
    thegreatzebadiah likes this.
  21. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    @thegreatzebadiah I have found a bug with NAT Traversal. It turns out you can only migrate hosts twice. By the third migration, the client that reconnects to the new host does not gain access to his player object. The object remains disabled. By the fourth migration, neither of the players have control of their player objects. They are both disabled. This is the error message displayed in the console.

    OnReconnectMessage connId=0 player null for netId:2 msg.playerControllerId:0
    UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

    This happens in both my project and the example project provided with NAT Traversal.
     
  22. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Thanks @TCROC, I'll look into it.
     
  23. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    having some trouble upgrading to the most recent version (1.46) of this plugin - i'm on Unity 5.3.5... here's some stuff from the editor.log.... any ideas?

    -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp-firstpass.dll
    TypeRef ResolutionScope not yet handled (49) for .DataResponseDelegate`1 in image C:\Users\chase\Documents\Dev\Unity\Projects\cb2\Assets\Plugins\NAT Traversal for UNET\NATTraversalForUNET.dll
    The class DataResponseDelegate`1 could not be loaded, used in
    -----CompilerOutput:-stderr----------

    Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

    note: i also get this same error trying to import the asset into a new, empty project.
     
    Last edited: Dec 22, 2016
  24. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    I have also found another bug. This bug is similar to the one that I just described to you. What happens is when I am not doing everything on one scene, and I migrate hosts, it only migrates between the first client and the host. The other clients reconnect but do not get reassigned to their player objects. This bug does not occur if I do not switch between online and offline scenes, but just do everything in one scene. I put together a project set up to reproduce the bug and will send it to you.
     
    thegreatzebadiah likes this.
  25. iCode

    iCode

    Joined:
    May 25, 2013
    Posts:
    33
    Hello, i was thinking about purchasing this asset, but i was wondering if you could explain to me its "real world" purpose. What i mean by that is i noticed it doesn't support mobile yet. Also, if i understand correctly, if your game is on steam, the steam SDK has nat punch through. So my question is, what scenarios do you see this asset being used. If what i said above is true, then this asset would be useful if you want to great a PC game but dont want it on steam? thanks! Also, i love how active you are on your asset thread!
     
  26. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @iCode Steam networking does indeed support punch-through, but then you've got to use steam's networking api. The goal of the plugin is to allow you to use punchthrough with any networking api you want (such as UNet). Just as an example our own game is being released on steam but uses UNet instead of steam's networking api (though we do use otherstuff from steamworks like the cloud storage and lobbies).

    The benefits are twofold, first you get to pick a more full featured api than steam's fairly low level stuff. Second you aren't writing your network code in a way that limits you to only releasing on steam.

    Hope that clears things up a bit. Let me know if you have any further questions. :)

    @TCROC Thanks, having a project to reproduce the bug saves me so much time / stress!

    @robochase
    That kind of looks like the error you would get if you were importing the wrong version of the plugin for your editor version. Check the README that comes with the plugin and make sure the unity editor version matches your editor version. Sometimes the asset store gets confused and doesn't want to give you the right version.
     
  27. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    No problem. I just sent it to your email.
     
  28. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    @thegreatzebadiah In the project I sent you, all you do is start in the offline scene. Host a game which will take you to the online scene. Then migrate hosts. You will find that only the original host and the first client get reassigned back to their player objects. Any other clients do not.
     
  29. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    ok yeah...my readme says 5.4.x

    how can i get the one for 5.3.x? i really don't want to upgrade to 5.4....making a vr game and unity really screwed up the ability to test multiplayer vr games on a single machine with 5.4.

    would you be able to send the right version to me somehow?

    EDIT: got the asset store to download the correct package. if anyone has problems with this, you have to delete this folder (windows 10) (quit unity first to be safe lol)
    ~/AppData/Roaming/Unity/AssetStore
     
    Last edited: Dec 22, 2016
    thegreatzebadiah and Fuestrine like this.
  30. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    587
    Just wanted everyone to know we'll be going silent for the next bit because of the holidays. Read the FAQ or this forum thread for a lot of the common user or Unity problems. If it's our fault, we'll get to it soon!

    Cheers, have a great time!
     
    Last edited: Dec 24, 2016
  31. deliinteractive

    deliinteractive

    Joined:
    Oct 8, 2014
    Posts:
    25
    Hey guys! We've been using the plugin for a while now and are generally having good success here, but it seems that our punchthrough success rates are next to zero when the host has an IPv6 address - whether the client is IPv4 or IPv6 doesn't appear to matter. That is, the only hosts which appear to work are those with IPv4 addresses. Is there additional functionality that we should be aware of to try and iron this out? We would really like to improve the number of successful connections made without the Unity relays (especially since we use Steam lobbies to pass data around and don't even use the UNet matchmaking system).

    Also, I haven't seen anybody mention it here, but after a punchthrough connection fails (but not a direct connection), we frequently get a series of errors, more than one per frame, about the host id being "out of bound" (not bounds). Again, is there something obvious we're not doing to get our connections cleaned up right? We basically do everything shown in the FAQ page, nothing too tricky or fancy. We use StartHostAll to begin our hosts. Once the Steam lobby data gets updated with the host's GUID and other relevant information, clients join with StartClientAll. We disconnect with StopHost() and StopClient(), respectively, when the players choose to. Our facilitator should be up-to-date and it runs on an Amazon EC2 server which shows no trouble being connected to. The only additional thing which I could see causing trouble is our use of the NetworkDiscovery component, which is used to broadcast games to the local network which the host is on, even if they are hosting an online game.

    Does anything here stick out? Let me know if you guys need additional details. Thanks so much for continually updating and supporting this!
     
    KyleOlsen likes this.
  32. Eiseno

    Eiseno

    Joined:
    Nov 1, 2015
    Posts:
    86
    Hi,
    How can i change this with unity network lobby ? I am currently using unity network lobby but i want use this with their lobby sytem.Because they have already good ui.Is it possible or anyone have sample about how can i make my own lobby system ?
     
  33. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    @thegreatzebadiah We are trying to build to the Universal Windows Platform, but we are coming across some issues. Whenever it builds, it prints off 999+ errors saying things such as.

    Reference Rewriter found some errors while running with command --target="Temp\StagingArea\NATTraversalForUNET.dll" --additionalreferences="Temp\StagingArea","C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade","C:\Program Files (x86)\Windows

    To reproduce the bug, you can use the example project that comes with NAT Traversal and just build to Windows Store Universal 10.

    I believe this website may be a solution to the issue. I've tried doing the things it says to do, but can't seem to get it to work. Maybe you will be able to get something from it.
    https://docs.unity3d.com/Manual/windowsstore-plugins.html
     
    Last edited: Dec 29, 2016
  34. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @TCROC It looks like I've got your migration issue fixed at least. I just sent you an updated version of the plugin via email. Let me know how it goes.

    @Eiseno (and everyone else who has requested lobby support) The NetworkLobbyManager is unfortunately not compatible with the plugin at the moment. I'm going to try and look into it a bit tonight though. If it's as easy of a fix as I expect it to be it should be in the next update.

    @deliinteractive There definitely seems to be some issues with ipv6. I'll be looking into it tonight and tomorrow. I think some of the info in your post should help me narrow it down. I'm not sure what's causing the "host out of bound" error, I don't think anyone else has reported anything like that happening when punch-through fails so I'm tempted to say it's something specific to your project. Does it happen in the Example scene using the ExampleNetworkManager?
     
  35. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
  36. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @deliinteractive @WaaghMan I've made some changes that I hope will improve ipv6 support but I'm honestly not sure why it's not working. My isp doesn't support ipv6 so it's hard for me to test but I at least seem to be able to connect to computers on my local network via ipv6. I've just changed it so that clients will only attempt to use the ipv6 address to connect if there is no ipv4 address available. Previously it would use ipv6 as long as both client and host supported it but something was clearly not working.

    @deliinteractive I actually did stumble across that host out of bound error when stopping the client before punchthrough was completed. Fixed now.

    All this will be in the next update which I'll try and get uploaded tomorrowish.

    No news on the NetworkLobbyManager yet.
     
  37. deliinteractive

    deliinteractive

    Joined:
    Oct 8, 2014
    Posts:
    25
    @thegreatzebadiah Thanks so much for looking into this! You guys have been excellent at keeping this plugin updated and we sure appreciate that. I'll post again after the update if anything odd comes up again. Right now there is one more strange thing - we can't host more than two consecutive games without the scenId of objects getting out of sync with clients who haven't gone through two games in a row - but it could be fixed with the update. Thanks again!
     
  38. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    @thegreatzebadiah Thanks for getting back to me. You fixed two of the bugs. Now I can migrate hosts after changing scenes and I can migrate hosts between several clients. However, there is one more migration issue and a new issue I discovered over the holidays.

    Migration Bug: When migrating between the same players, at around the third or fourth migration the client and host will not be reassigned to their player gameobjects. This bug is easily reproduced between one client and one host. This bug will occur with several clients as well, but takes many more migrations before it occurs. I believe the bug occurs when their is a migration between the same host and client more than three times.

    New Bug: I am unable to build to the Windows Store (specifically the Universal 10 sdk). 999+ error messages are printed off saying things such as

    Reference Rewriter found some errors while running with command --target="Temp\StagingArea\Assembly-CSharp.dll" --additionalreferences="Temp\StagingArea","C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade","C:\Program Files (x86)\Windows


    and

    Reference rewriter: Error: type `UnityEngine.Networking.NetworkMigrationManager` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void ExampleMigrationManager::OnGUI().
    UnityEngine.Debug:LogError(Object)

    This is easily reproduced by simply attempting to build to the Windows Store Universal 10 sdk with the Example Project included with NAT Traversal.

    This website may be able to help. I couldn't seem to get what it was saying to work but maybe you will be able to get something from it.
    https://docs.unity3d.com/Manual/windowsstore-plugins.html
     
    Last edited: Jan 3, 2017
  39. voltage

    voltage

    Joined:
    Nov 11, 2011
    Posts:
    515
    So I think Traversal bricked my project. It hasn't been playing nice with 5.50f3.

    natTraversalBrick.png
     
  40. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    I think somebody else had that issue earlier in the forum. I think it was a pretty easy fix. All you have to do is change one of the #ifUNITY_5_4 to like #ifUNITY_5_5 or something. Idk. I purposely haven't updated my Unity until 5.5 is supported with all my assets. You should be able to find it if u search through the forum or you can just wait to hear from Zebidiah.
     
    Last edited: Jan 3, 2017
  41. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Great find @TCROC, this is actually a bug in UNet's NetworkMigrationManager. After tracking it down all day I finally figured out that there is a list of pending players that is not being properly cleared. There's even a mysterious comment in the unet source that seems to be related. Of course after spending forever tracking it down I finally think to try and recreate it without the plugin, using the regular old NetworkManager and NetworkMigrationManager, and sure enough I get the same error. Simple enough fix though, I just added a couple of lines to clear the pending player list and now it's all gravy. The host migration in the plugin is now more functional than UNet's. Hurrah!
     
    Last edited: Jan 5, 2017
  42. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    Great to hear! :) Haha glad I was able to find it for you! I'll make sure to leave another review (if I can make a second one) that the host migration is even better than Unity's! :)

    Now the only issue I have left to report is that bug I mentioned above when trying to build to the Windows Store. Hopefully that solution is just as easy.
     
  43. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @TCROC I'm looking into the windows 10 store thing now. I don't think that link you posted is going to help though. If I'm understanding correctly that's about plugins that use the Windows Runtime API which the plugin doesn't use. I'm installing the uap sdk now though so I should be able to look into it in a bit.
     
  44. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    Sweet. I look forward to anything you find.
     
  45. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Well I gave it a good try but I think it's bad news. It looks like the issue is that the Windows store uses a different version of .net than the editor and every other type of build. I was able to really easily update all the plugin code to work with either version of .net but now the error has just moved to the RakNet.dll which is going to be considerably harder to port to a new .net version. I think for now the unfortunate answer is that the plugin does not support Windows Store builds and it will be a while before I can even try and port raknet. I'm honestly not even sure if it will be possible.

    If you just can't wait you can take a stab at it yourself. There's a bit about compiling raknet for window store on this page: https://github.com/OculusVR/RakNet

    But the real problem is going to be the Swig stuff that generates a c# wrapper for the c++ raknet library. The only way I was ever able to get it working was by using the exact right versions of visual studio, the .net framework, and swig. I don't think it's going to be possible to use a newer .net or swig version without some serious reworking of things that I barely understand to begin with.
     
  46. TCROC

    TCROC

    Joined:
    Aug 15, 2015
    Posts:
    230
    Thanks for getting back to me and looking into it. So I did some research quick and RakNet claims to be compatible with Xbox One. Is there another way of deploying to the Xbox One other than the Windows Store that I'm not aware of?0
     
  47. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    Compiling RakNet for whatever platform isn't the issue. If we were working in c++ it would be that easy and done, but unfortunately we need c# wrapper to be able to do anything with the dll. The problem is generating the Swig files for the c# wrapper. Somehow the raknet swig stuff needs to be updated to generate a wrapper that works in the newer .net and I'm honestly not sure how to go about it. I had never encountered swig until I started work on this plugin so I'm not very familiar with it.
     
  48. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    It's just about my bed time, so I'm not going to get this thing packaged today anyway. I'll take another look into the swig stuff before I put out the update tomorrow but no promises. If it looks like it's going to be a serious amount of work it will have to wait until the next wave of updates.
     
  49. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    i'm interested in the IPv4/IPv6 fixes. any idea when that change will hit the asset store?

    i have a couple friends in different parts of the country that i have had some trouble establishing connections to. it's usually a 1-way problem - usually one of us won't be able to connect to the other, but if we switch who the host is, it seems to work ok. curiously, i'm on IPv6 and these guys are on IPv4, so I'm hoping that does it for me.

    thanks for all the work you put into this awesome plugin!
     
  50. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @robochase Well I originally meant to have the update out about two days ago....I should actually finally be able to get it uploaded tomorrow, but then it can take about a week to actually show up on the store. If you'd like to test it out in advance for me though just shoot me an email to the support email on the store page and I can get it to you a bit earlier.