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

Official UNet Deprecation Thread

Discussion in 'UNet' started by BHouse, Aug 2, 2018.

  1. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Should be able to use Ignorance with just one line of code.
    But sure, an official rUDP library from Unity would save us a whole lot of work, so like @goldbug said above, we are definitely looking forward to that day.

    I have seen your name on the networking forums before. Feel free to join the Mirror discord, maybe you can help making things easier for everyone :)
     
  2. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    Ignorance does look easy to drop in. But given that it's just a thin wrapper between Mirror's TransportLayer and ENet, it's not the most transparent system to work with as any problems could have come from either side, and it introduces the ENet dependency as well. This is not ideal for a commercial situation.
     
  3. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    766
    It also includes LLAPITransport, if you want to stick to LLAPI
     
  4. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    Which (as I think I've said to you several times before) is irrelevant if we're talking about forward compatibility once UNet is gone. This is the UNet Deprecation thread.
     
  5. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    766
    Looking forward: once they implement reliable, we should be able to get the new transport working with Mirror.
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,967
    We are also pretty livid that this was removed without any prior warning despite official word it would be removed after 2018.4.

    How is any studio supposed to undertake commercial contracts if we cant trust what unity outlines as future plans?

    Its very hard already to make networked solutions using unity, harder if those solutions cease to function from no fault of our own, basically because we are not mind readers.

    Please please communicate with us next time before making such a decision, or at least dont tell us you will do one thing and do the opposite.
     
    Anjin_nz likes this.
  7. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    261
    Wow, relax guys. It has not been removed yet. Look for yourselves. The path is:
    Editor\2018.3.0f2\Editor\Data\UnityExtensions\Unity\Networking\
    I think the Unity dude's comments were wildly misinterpreted.
     
  8. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    No, they were just wrong.
     
  9. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    And one more thing, in light of today's news...

    Will we still be able to host your own dedicated servers without paying for an additional licence?
     
  10. JTovey

    JTovey

    Unity Technologies

    Joined:
    Oct 30, 2018
    Posts:
    35
    Hi Kylotan,

    Can you confirm what news you are referring to, and I will try to confirm whether this is the case for you?
     
  11. BHouse

    BHouse

    Joined:
    Jan 10, 2018
    Posts:
    76
    Hi All - apologies for the confusion about HLAPI removal.

    We've always planned to move HLAPI to a package with full source, independent of the deprecation plans. That could happen at any time.

    LLAPI, however, is too tightly tied to the core Unity player loop, and we will not move it to a package. At some point in 2019, it will be removed completely, but as I've mentioned in this thread before, we will wait to remove it until the new low level stack/packages are stable enough and have enough features to make that reasonable.

    At this time, that means 2019.2 at the earliest, and very likely may be 2019.3 before you no longer see the code in the editor and engine.
     
    goldbug likes this.
  12. BHouse

    BHouse

    Joined:
    Jan 10, 2018
    Posts:
    76
    I just updated the initial post to reflect this (and include the link to the alpha transport), so hopefully others in the future will start with the latest info.
     
  13. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    I am referring to the recent news regarding the ToS and Improbable, and specifically the fact that we keep being told that they are in breach of the ToS without there being any specific indication of which part they infringed. The implication is that Unity are demanding that nobody helps anyone with running Unity games online without paying Unity for the privilege. The reality is that the ToS basically means they could demand that almost anyone has to pay extra to run games online, even their own.

    For example, the current ToS say "you may not use a managed service running on cloud infrastructure (a “Managed Service”) [...] to install or execute the Unity Runtime on the cloud or a remote server". What counts as a Managed Service?
    • If AWS automatically spin up an extra instance of my game, am I in breach?
    • If my ISP administers my hosting for me and reboots the game, they're another 3rd party executing the runtime - am I in breach?
    • If I am a company that runs live operations for other companies, and we're administering and restarting their Unity servers, are we the Managed Service, and are they in breach?
    I mean, it's arguable that all this is irrelevant given that the ToS essentially say it is unauthorised to even distribute a Unity game, networked or not, but I'm going to pretend that isn't there right now...
     
  14. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    Thank you very much for this - very clear and precise.

    Edit: see next 2 posts. I don't want to read too far between the lines, but could you comment on which of these scenarios is closer to the current plan:
    1. Unity will update the future HLAPI package, somewhere before 2019.3, in order to use the new com.unity.transport low level code
    2. Developers will be expected to edit local copies of the HLAPI package to use the com.unity.transport code
     
    Last edited: Jan 15, 2019
    Anjin_nz likes this.
  15. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    261
    They've already updated the HLAPI to allow using a different transport. It'll be configuration instead of code changes.
     
  16. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    212
    Good point, but the new transport and the old transport don't have the same interface, so let me reword as:
    1. Unity will write a wrapper, somewhere before 2019.3, in order to use the new com.unity.transport low level code with the HLAPI
    2. Developers will be expected to write their own wrapper for the com.unity.transport code to plug into HLAPI
     
  17. BHouse

    BHouse

    Joined:
    Jan 10, 2018
    Posts:
    76
    The plan is closest to #1 - to update the HLAPI package to be able to use the new transport once we've released reliability features. TBD exactly when, but it will be before LLAPI is removed from the engine.
     
    Anjin_nz and Kylotan like this.
  18. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    363
    So which is it then? Are you deprecating (and eventually removing) the HLAPI that has been part of Unity for several years, or are you fixing it and moving it to a package that you'll actually be improving & maintaining? In the latter case, how do you square that notion with this:

    upload_2019-1-17_13-53-49.png
     
    Last edited: Jan 17, 2019
    Anjin_nz likes this.
  19. BHouse

    BHouse

    Joined:
    Jan 10, 2018
    Posts:
    76
    The HLAPI will move to a package independent of sunset timeline; while this package may exist indefinitely it will only be officially supported for the timeline promised (until Spring 2021). Until that date we will still provide critical fixes to keep it functional, but no new feature development.

    Future higher-level features will be provided as packages throughout 2019 and beyond. For example FPS-style networking is our initial focus, so this year you can expect to see packages for interpolation, forward prediction, delta compression, etc. However, we will not be building another monolithic HLAPI that directly replaces the UNet version; we've made the call that transparent and modular features provided as optional packages is a better architecture for games to be able to perform sufficiently well.
     
    Kirsche, Guerro323 and chiapet1021 like this.
  20. BHouse

    BHouse

    Joined:
    Jan 10, 2018
    Posts:
    76
    Confirmed - you will be able to host your servers wherever works best for your game.
     
  21. Anjin_nz

    Anjin_nz

    Joined:
    Jun 24, 2014
    Posts:
    75
    Hmmm. This is not a great situation. Well done Unity devs for raising this important issue. Again and again and again. Too many times.

    Today we are evaluating a our network platform strategy for 2019

    Here's the summary:

    * UNET never really worked.
    * New network solution is still in development and not released (we volunteered to beta but have not heard anything)
    * Photon has broken in 2018.3
    * Working Legacy system removed in 2018.2

    So we should all remain on 2017 LTS? Not a solution if we need dotNet 4.0 libraries (namely GDAL/OGR)

    I am puzzled. Why did Unity remove legacy networking if they knew that the UNET stack was half cooked. Surely a better option was to leave in Legacy until the new system was ready?

    I do applaud the adoption of the entity system that's a good move. But...

    Did you have to kill all the networking stacks to do it? And from the looks of things it is *ALL* the networking stacks. IE nobody can make a networking game on Unity 2018.3+. What do you advise we do?

    Someone very high up in the tech side of Unity should be answering on this thread. It should be an authoritative technical answer which should state what they expect developers to do and that they understand the situation and that its intentional and not a mistake.

    I really don't want to find out that nobody high up understood the developers pain here.

    To people on both sides of the Unity fence thank you for spending time on this issue. Its important.
     
  22. JTovey

    JTovey

    Unity Technologies

    Joined:
    Oct 30, 2018
    Posts:
    35
    Hi Anjin,

    If you are using HLAPI then this is still present in 2018 LTS (apologies for any previous confusion on this point). If you require lower level commands, then it might be best for you to try the new transport library (https://github.com/Unity-Technologies/multiplayer). There are several pending changes to the internal version of this library that are being reviewed for release to the public version which should be coming in the near future (for more info, see here: https://forum.unity.com/posts/4114060)

    We are investigating the issue with Photon and will let you know in when we have more information.
     
    Cromfeli likes this.
  23. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    277
    The legacy system (RakNet based) which was removed in 2018.2 had been deprecated in Unity 5.1, in 2015. It was well past time to remove it. Everything costs resources to maintain, even if no improvements or active development is being done per se, when new platforms emerge and things change internally deprecated system also need to be kept working. The legacy system was very slim on features, mostly everything it had is supported by UNet, the exception being NAT punchthrough support and the services surrounding it worked differently (focusing on supporting NAT punchthrough games).

    UNet can be split into the service, transport and the high level API, the high level API had the most problems. I expect that's the one you mean to have never really worked. It was trying to be a bit too generic and support all types of games and did not have deep enough support for certain game types (like proper lag compensation), besides having a few issues with the design (which lead to very tricky bugs). The plan was to basically rewrite it and fix underlying design issues in the process, before it was decided we'd be moving in a different direction with higher level netcode implementations (and eventually everything else as well, transport and service). It is open source so it's possible to fix/improve it for specific games, and there are forks like Mirror which have done a lot of improvements for the community. It's possible to keep using Unet in 2018.X releases, it's only marked deprecated but will not be removed.

    The decision to mark it deprecated before a replacement was ready (so a bit prematurely) was to give you an advanced warning and to clearly show how the feature is being treated while the replacements are in development. Basically major efforts were diverted to the new systems (new ECS compatible transport and future netcode and Multiplay hosting related efforts) and there are only minimal support/maintenance efforts left on UNet.

    Going beyond 2018.X, in 2019.1, the high level API has been moved to a package and is now completely independent on any engine code running, so could be kept working forever in theory (it can use any transport). Atm the package can be added by adding it to the projects manifest.json file by adding "com.unity.multiplayer-hlapi": "0.2.4-preview" to the dependency list. The transport which is inside the engine itself is expected to be removed later in 2019.x at a time where the new transport is mature enough so people can switch to that. For the new transport there is no closed beta for the new multiplayer feature like @jackt_unity pointed out (see his links for more info).
     
  24. bennett_apps

    bennett_apps

    Joined:
    Oct 9, 2018
    Posts:
    41
    Hi,
    Thinking about making a first multiplayer project. If current solution for multiplayer being depreciated, what do I use to make game? Don't think I should learn the current system, but what replacement?
     
  25. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    363
     
  26. Anjin_nz

    Anjin_nz

    Joined:
    Jun 24, 2014
    Posts:
    75
    No we are using legacy due to UNET being a disaster. I think that's a known fact.

    So what do we do? Rewrite our code to llapi? Please advise. Keep in mind that is supposedly a much lower level stack AFAIK.

    My point is that working solutions were deprecated and then removed without clear functional replacements.

    I think we need Joachim to make a statement please.

    I appreciate the efforts of unity staff here but it's getting swept under the table again.
     
  27. Anjin_nz

    Anjin_nz

    Joined:
    Jun 24, 2014
    Posts:
    75
    Just to set the tone of my previous post. Lets keep this calm and not a finger pointing exercise. What's important is the path forward.

    This is a desire for a considered dialog where our Indie company (Anjin Games) is actively involved in making Unity games at the highest level (see our Deadbotz game on Google Play). We also make a vr version of our product. We have used Unity for 6 years now.

    We saw the issues with UNET and decided to wait. I think that was reasonable given what happened when the developer left. I think a lot of people did (or switched to 3rd party solutions).

    Clearly the legacy solution was deprecated but remained in for a very very long time. That should be proof enough that there was an issue.

    If the only option is to use the lower level llapi which is stable then fine. That does seem like a lot of work however.

    I'm would like to explore if there is a way to move to the new system for prototype level work and remain on legacy for production. Hence not having to bother with UNET/llapi.

    I would like a Unity senior technical person to own this. Another confusing transition would be a mistake and I think the community is trying to raise this to ownership so that doesn't happen again.
     
  28. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    Hello,

    After a lot of investigations, I am planning to stay with Unity 2018.3 / 4 LTS and use UNET.

    How do I remove the deprecation warnings, they drive me crazy :)

    Thanks,
    Mihai
     
  29. Skjalg

    Skjalg

    Joined:
    May 25, 2009
    Posts:
    211
    Its been over 3 months since the new multiplayer alpha repository arrived. It being an alpha I was expecting frequent updates. Last word about another update said before christmas, then early january. It now being late january and still no update has me thinking its abandoned.

    Is this the case?

    Will we see an update with more features soon?

    In the future, will updates and bug fixes to the repository be more frequent, like the new post processing stack does?
     
    Anjin_nz and lailing2000 like this.
  30. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    You know it took them at least 2 years to get UNET up and running and stable. There were TONS of bugfixes needed for UNET to get it at the current stage.

    Devs usually forget that when they re-write something, they also have to take care of all the edge cases they fixed in the previous version and that's a lot of work. They get all enthusiastic and say something like: "Look at this new architecture, it's all going to be so much better"

    So I wouldn't expect something stable this year on MP side. And I don't think it's the kind of feature that you can release a game with while being in preview. Even they say "use UNET if you plan to release your game this year"

    It's all fine and cool the whole plan with the new MP architecture and the other features like scalable hosting and etc. But realistically speaking, it's not going to happen in 2019.

    IMHO, Unity's reliable multiplayer solution is still UNET and if you want to use it you are stuck with Unity 2018. And they deprecated it because they could not port it on ECS, not because they have something better or because they are eager to work on the new solution.

    All I want to know is how I remove those deprecation warnings. :)
     
    PutridEx, Karsten and ModLunar like this.
  31. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  32. DarkDungeonStudio

    DarkDungeonStudio

    Joined:
    Oct 31, 2013
    Posts:
    37
    So I'm busy developing a multiplayer turn based game right now.
    It won't be ready within the next 6 months, will probably only be a year from now.
    If I can't use UNet anymore, what do you recommend I use?
    I can't just put the development on hold.
     
  33. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    363
    If it's turn based, would a web service suffice for the "server"?
     
  34. DarkDungeonStudio

    DarkDungeonStudio

    Joined:
    Oct 31, 2013
    Posts:
    37
    I could create my own API with basic requests and something like WebSockets, to handle chats.
    It's just a lot more expensive than what Unity's Network service would cost me.

    Using UNet would've been between $3 and $30 a month according to their calculator, but doing any sort of server hosting I'm looking at +- $70/month.
     
  35. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    363
    Light duty VPS's are a lot cheaper than that...look at Vultr, Digital Ocean. Even GameLift Spot Instance is $48 if it runs all the time, and you get the back-end services too, and there's a 12-month free tier. PlayFab might be another option.
     
  36. Snotax

    Snotax

    Joined:
    Jan 28, 2019
    Posts:
    14
    Hello everyone.

    I'm a bit confused. I wanted to implement Multiplayer (LAN) Features to our current Project and saw then this thread / problem.
    What is the thing to do now ? UNet is deprecated and not to use anymore and the new one is still not around ?

    So, what should we do now ? Implement our networking with a custom community extension, use the old UNet or even wait with the development till the new layer comes out ?

    Thank you for your help.
     
    Anjin_nz likes this.
  37. CallMeSpam

    CallMeSpam

    Joined:
    Feb 10, 2018
    Posts:
    19
    I think it depends on timing and how high level you want your networking to be.

    Background
    Unity seems to be running into technical difficulties with their new Transport. They released an alpha version of the new transport in October but has not updated it since: https://github.com/Unity-Technologies/multiplayer They also released their FPS game example here: https://github.com/Unity-Technologies/FPSSample The FPS sample was written before the Transport, so there isn't much if anything in common between the two except, perhaps that they both use UDP. The new transport is bare bones, not much different than a raw sockets implementation while the FPS has more bells and whistles (and is also a lot harder to understand). Neither could be said to be production ready, and documentation is poor for both.

    Options
    If you are a year or two off from final product, you could wait. Otherwise a third party solution may be right for you. There are a multitude of options both paid and open source. Which one to use would depend on your specific application, budget, and personal preferences. The ones that I see talked about the most are: Mirror (UNET clone), Forge Remastered, and of course the Photon products, but I have not used any of them. I am, instead using the current dearth to learn networking at a lower level while I wait to see what Unity comes up with.
     
    Last edited: Jan 29, 2019
  38. Snotax

    Snotax

    Joined:
    Jan 28, 2019
    Posts:
    14
    Thank you very much for this detail answer!
    I was kinda thinking this. I informed myself about the other options and I think I'm going with Mirror for the moment.

    You really helped my decision process, thanks for that.

    Have a nice day!
     
  39. zereda-games

    zereda-games

    Joined:
    Dec 8, 2016
    Posts:
    14
    All seems pretty exciting, my only issue with Unity is by the time i learn something new it changes ahah, all good im still in a learning state, trying to find a way to my a business out of all this mess. Currently working on building a team and a core framework of the project, but it sure is slow going i tell yeah.
     
  40. danger726

    danger726

    Joined:
    Aug 19, 2012
    Posts:
    184
    I'm in the same boat as you, so I feel your pain. I'm still stuck using the legacy RakNet based API, I never switched over to UNET as I wasn't happy with it when I last looked at it (and now it makes no sense to do so). I haven't looked at any of the third party solutions recently, but even they're subject to the winds of change (e.g. I started looking at Bolt ages ago, but that's changed a lot since it was taken over by Photon, doesn't seem to fit the bill for me anymore).

    I'm not sure what to do at the moment, but until I find the time to deal with this, I'm stuck on Unity 2017.4 LTS.
     
    Anjin_nz likes this.
  41. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    Well,
    there are lots of frameworks and libraries out there for networking.
    But how many choices you actually have in the end depends on how much you want your network api of choice to do for you.

    If you just want
    net.Send(obj);
    and
    var obj = await net.ReceiveNext();
    then you could try this: https://www.rikidev.com/networking-with-ceras-part-1/

    Sure, its just a very simplistic example; but for some quick prototyping (which I assume is what many people here do) you can't really go wrong with it.
     
  42. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    766
    From experience I can tell you Unity has scalability issues with await/async. It looks like if you try to have more than 1.2K async tasks, it completely falls apart. This issue does not happen with .Net core or .Net framework standalone.

    If you don't need that many async tasks, then yeah, it is great.
     
  43. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    I don't know if that was a sarcastic answer or not.

    I found that adding:

    #pragma warning disable 0618

    In every file that uses UNET, removes the deprecation warnings.
    If anyone wants to know.
     
    ModLunar likes this.
  44. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    That might be easier :)
     
  45. Anjin_nz

    Anjin_nz

    Joined:
    Jun 24, 2014
    Posts:
    75
    Thanks that's good to know someone else is using Legacy with 2017.4 LTS successfully. Perhaps that's the answer but I do need ecs for a new project I am working on at the moment.

    Can I ask what the experimental mono 4.6 support is like please? Are you using it?
     
  46. danger726

    danger726

    Joined:
    Aug 19, 2012
    Posts:
    184
    I've no experience of using mono 4.6, I have been thinking of switching over to it, but haven't done so yet.
     
    Anjin_nz likes this.
  47. Ecodestruct

    Ecodestruct

    Joined:
    Oct 28, 2015
    Posts:
    2
    Hi guys, I know I'm a bit late to this thread
    So I was working on a network based game and it worked till Unity 2018.1
    After updating to Unity 2018.3, none of my network features work and everything is deprecated
    Please give advice on how to go about changing the networking system?
    Very unhappy with the way Unity suddenly pulled the plug on this one...
     
  48. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Probably need to mention what networking system you're planning to change to for anyone to give advice on that change. 2018.3.x still includes Unet, so Unet is probably not what is broken in your project. As far as what to switch to, my understanding is Mirror is likely the most painless switch assuming you're not using any Unity hosted services.

    Unet isn't being removed until 2019.2 at the earliest according to the last announcement on the topic.
     
  49. BHouse

    BHouse

    Joined:
    Jan 10, 2018
    Posts:
    76
    Hi All - we took some time to discuss feedback internally, and we want to share a few updates (sticky post also updated):
    1. LLAPI guaranteed in 2019 LTS build - due to demand for more time to transition and give the new transport more time to mature, we've decided to guarantee that the LLAPI will remain in the engine in the 2019 LTS build at the end of this year, and therefore will be supported with critical fixes in that build until Spring 2022. This is a 1-year extension from the original plan, and we will soon update the original blog post to reflect this change.
    2. Active Projects list for Networking - the networking team has published their current priorities to the public git repo project view as a "plan of intent" - it's their goal to keep this up-to-date with each of the projects we are currently working on. We've been seeing solid progress internally, and we're hopeful that some of the work-in-progress items listed in Github will be in the hands of the community soon.
    3. DOTS-compatible - the new networking stack will work with ECS, Job System (for multi-threading), and Burst Compiler to reach the best possible performance and scale. AND, it does not require you to use DOTS for everything, most of your game can still be written in classic unity if you prefer that.
    4. HLAPI support LLAPI and new transport - HLAPI will be released soon as a full-source package, and will be supported according to 2018LTS terms, so critical fixes will be provided until Spring 2021. This has not changed from the original plan. For clarity, The HLAPI will support LLAPI and the new transport (once it reaches a sufficient feature set) throughout this transition period. We feel confident that before 2021, the new networking stack will be a much more performant solution than the HLAPI, and we strongly recommend developers move over by this date.
     
    Last edited: Feb 14, 2019
  50. Anjin_nz

    Anjin_nz

    Joined:
    Jun 24, 2014
    Posts:
    75
    My honest answer is that's a big disappointment (No offence to your team, thanks for communicating)

    I again call for someone senior in Unity to own this and ensure networking gets the priority it deserves.

    this gives me two options
    1. Remain on 2017 LTS until 2021
    2. Rewrite our network code for a year and then rewrite again the following year

    A much better option would be to have the new networking done by end 2019.

    How can we push this up the priority stack?