Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Unity Multiplayer UNet Deprecation Thread

Discussion in 'Connected Games' started by BHouse, Aug 2, 2018.

  1. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    8,520
    Unity's "support" for Unet is really no different today than it has been since 2016. No feature improvements, no one assigned to even working on the HLAPI, don't expect any bug fixes. Nothing has changed other than being upfront about the situation.
     
    Monteworks likes this.
  2. MedoMelo

    MedoMelo

    Joined:
    Jul 5, 2019
    Posts:
    42
    I confirm Mirror is really great. It's even better than UNet, strong community, strong support. Nothing to worry about, the rightful successor is here.
     
    Joe-Censored and vis2k like this.
  3. greenbraygames

    greenbraygames

    Joined:
    Apr 24, 2019
    Posts:
    8
    Where is the documentation for the new tech stack? I'm having trouble finding it. Same for server authoritative code. I was hoping for some help in figuring out what to use instead of UNET like what my options are. I dont have release planned for another year it was less time but still over 6 months.
    I'm completely unsure what to do due to the lack of real visible options at the Moment. Some of the pages I've read about it all either refer to UNET or it has no real replacement for the time being.
     
  4. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    256
    Been a while since I bothered to naysay Mirror...

    It'll take you longer than you think, so you have time. Use UNET or Mirror, they're both terrible. Don't believe the hype about Mirror. Fixes some bugs that you may or may not run into, but does so while rewriting the code very poorly. Use either one. It's prototype code that you'll have to rewrite for production, but will save you a ton of up-front development frustration. Both libraries will do server authoritative. It's a matter of configuration.

    If/when the new stack becomes viable, you can switch out the networking for your working game pretty easily if you take any care at all to keep it abstracted.
     
    Last edited: Sep 18, 2019
    KyleOlsen and TwoTen like this.
  5. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,588
    Agreed, always better to try for yourself first :)
     
    Joe-Censored likes this.
  6. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,157
    If you need the architecture and features powered by the new tech stack or you wish to roll your own solution out. I totally agree. They are the best options for the "high tier" networking.

    If you wish an alternative to UNET, you should check out my MLAPI project. It shares the same architecture with UNET. Which means it has many of the same principles of UNET but also allows you to build all in house. It doesnt force ANYTHING on you, everything is optional and can be used together with every other feature. Say you want your own spawn system, you can easily replace MLAPIs system and write your own while still getting the features of the MLAPI such as serialization, encryption and much more. It's a more layered approach that works if you want something super high level such as UNET and also if you want to roll your own solution out all together but just have some barebones stuff to help you.
     
    Last edited: Sep 19, 2019
    Joe-Censored likes this.
  7. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,157
    Fair, my apologies. Comment was edited.

    What angus wrote down below is about what I tried to convey. The comment was not pure humorus, it had a underlying point / implication. But my wording might have been unfair.
     
    Last edited: Sep 19, 2019
    Joe-Censored likes this.
  8. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    256
    Software is not something you "try", unless trying means actually testing its suitability for your use cases. Testing, let alone integrating, a networking library is not something to be done on a whim. Please don't imply that just because something doesn't fail an immediate smoke test one should make the leap to using it.
     
    KyleOlsen, Joe-Censored and TwoTen like this.
  9. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    Why not keep UNET and improve it, and keep it free?
     
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    8,520
    It is a little late for that question, but here's their answer from a little over a year ago.

    https://support.unity3d.com/hc/en-us/articles/360001252086-UNet-Deprecation-FAQ
     
  11. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    564
    Ironically, the current implementation provides nothing of this while it's in development for more than a year. It's almost the same traditional networking abstractions that were available for decades, just done from a bit different angle, suboptimal in several aspects, lack of many essential features at each layer, and evolve very slowly.

    The ambitions of people behind management and marketing at Unity surprising me every time. So many promises and loud statements while there's so little actual progress.

    You have invested in Multiplay with infrastructure, why you don't invest in the engine's network subsystems respectively? I only see some internal reshuffling since Alexey Abramychev left the company in April, but those people who are working on the new stack now are really can handle it?
     
    Last edited: Feb 21, 2020
  12. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    Why not mark something as deprecated only when you have another production ready alternative available?
     
  13. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    256
    Are you complaining or asking a question? It's already been answered, just like your last question.
     
  14. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    Where has it been answered ?
    Does it matter if it is a question or complaint, e.g. is this only for your own info / knowledge?
     
  15. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    256
    Hello again new friend.

    Sure, let's pretend you do need this spelled out in detail? Complaining would hopefully just be ignored. An actual question someone might be inclined to answer (by needlessly quoting this very thread for you again.) Either way, it's been covered extensively quite some time ago, which should also not need to be explained.

    I don't actually care if you're complaining or not, you busted me. Just wanted to point out that you are not adding anything useful here. I'll simply un-sub from the thread, problem solved from my end. Please see https://github.com/angusmf/HLAPI-ex for an example of how you can at host your own forked version of the HLAPI package and fix things like the deprecation warnings if you like.

    Goodbye sweet deprecation thread! I'll miss those exciting early days, the snarking, sniping, the woe! Vis and 210, hugs'n'kisses...see you on the next one!
     
    Last edited: Sep 30, 2019
  16. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    Sorry if I am late to the party... thanks for the information.
    Did not intend to rain on your parade, but your tone to me sounded a bit abrupt initially, let's move on and be civil to each other :)
     
  17. sky-coding

    sky-coding

    Joined:
    Oct 26, 2018
    Posts:
    2
    It's frustrating that all of the LLAPI classes are marked as Obsolete and have had their documentation stripped out, without a native alternative in place. Despite this I went to use the LLAPI today for a quick UDP+WebSockets prototype (which LLAPI is perfect for) using Unity 2019.2, but NetworkWriter and some other important low level stuff has been entirely removed. I'm having to roll back to 2018.4 LTS so I can just get some simple networking done. How did Unity's multiplayer support end up in shambles like this? Is nobody making multiplayer games using Unity these days?
     
    khos likes this.
  18. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,157
    NetworkWriter and such is distributed as a package for the newer versions of Unity. You can still grab it.
     
    Joe-Censored likes this.
  19. Eben_

    Eben_

    Joined:
    Jan 3, 2017
    Posts:
    6
    Hey folks, I'm trying to understand something. I'm new to networking and know very little about it works. If I run an old version of Unity that still has UNET, will it still be okay to create a simple multiplayer game that doesn't use a dedicated server? (and players can just host and connect to each other directly) I understand UNET has been deprecated but the code will still work right?
     
  20. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    To be honest I am not sure what is going on, other than UNET seems to be made deprecated while there is no suitable replacement. Others , please correct me if I am wrong.
     
    Joe-Censored likes this.
  21. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    331
    If you want to make multiplayer games and still (basically) use UNET, I recommend Mirror. It's basically UNET with fixes. It will be easy to get into due to the similarities with UNET and all the UNET tutorials that are already out there.
    Personally, I don't have any experience with MLAPI but it seems promising. Maybe you could give that a try too.
     
  22. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,157
    MLAPI is also very close to UNET but has many more features, and is a much more modern and feature rich alternative.
     
    Joe-Censored and RealMTG like this.
  23. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    704
    That is right. You may want to go back and read the first 2 or 3 pages of this thread. Your's and many other questions have been asked and answered.
     
  24. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    Ok, thanks for the info :)
     
  25. polysoft3D

    polysoft3D

    Joined:
    Aug 3, 2015
    Posts:
    21
    I try implement new Multiplay from github

    I have this error
    Assets\sampleproject\Samples\Ping-Multiplay\Client\MultiplayPingClientUIBehaviour.cs(4,19): error CS0234: The type or namespace name 'Ucg' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Assets\sampleproject\Samples\Ping-Multiplay\Server\MultiplayPingServer.cs(8,13): error CS0234: The type or namespace name 'Ucg' does not exist in the namespace 'Unity' (are you missing an assembly reference?)

    and other 11 errors like that

    Ucg what is that ?
     
  26. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    121
    With Google Play Games Multiplayer and Turn Based retiring on March 31st 2020, what are alternatives for an Indie Turn Based game w/o in-apps or ads, so no constant cash flow, in turn can‘t afford high server costs? The UNET cost calculator came up with a totally affordable number, and with the Connected Games announcement I thought this would be a good replacement for GPGS with probably a similar cost structure. However none of that materialized, with turn based being not addressed at all for now. What are you other TBG devs doing? Is everyone now coming up with his own server infrastructure to handle it?
     
  27. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,588
    You don't need Unity's services to host your game. Just host it on a server somewhere on the internet.
    We host one of our Mirror demos on a f1-micro server on google cloud, which is completely free.
    If you need a relay then that's a different story of course.
     
  28. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    121
    Maybe the hardware portion is rather easy, but what about the software orchestrating everything? What about the whole push notification infrastructure cross platform (Android, iOS, Windows, macOS, ...). I don't feel like I'd be able to come up with a competitive server-side orchestration of a TBG with all the bells and whistles to be considered.
     
  29. janne404

    janne404

    Joined:
    Jul 26, 2009
    Posts:
    15
    Is there easy way to hide/disable all the UNet hlapi deprecation warnings in 2018.4? I know it is necessary to display deprecation warnings to get the message across, but when you acknowledge the situation and have decided not to upgrade it would be nice to be able to just disable them.
     
  30. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,588
    Try Mirror :)
     
  31. mhernandez88

    mhernandez88

    Joined:
    Jul 20, 2016
    Posts:
    31
    I know your post was a few months ago however I had to address it. I know you from the Forge community and I know you have a fair bit of expertise, however I think you may have missed the point of the new networking tech. No one has promised some new magical solution, in fact they have promised the opposite. Unity has taken the responsible approach of saying hey we cant code everything so we are going to provide you the building blocks and code a few architectures on top of it called "Game Archetypes". So instead of providing "One networking solution to rule them all" they will provide, FPSNetcode, MMONetcode etcetera.

    The other thing to note is that the transitions largest change is that it is part of the DOTS ecosystem and as such supports performance by default. What does this mean? The base architecture is considered an optimal starting place for developing performant code. All ECS objects and by definition all the Networking objects are laid out in memory linearly as to take advantage of cpu caches. This also allows for efficient calculation of deltas and a bunch of other fast optimizations.

    UNet and every other monobehaviour based library are good for what they are, but what they are is now apparent, they are fragmented wastelands of poorly optimized memory that provide a high amount of functionality and usability, but are not performance by default.
     
  32. Kylotan

    Kylotan

    Joined:
    Feb 17, 2011
    Posts:
    195
    This plan was revealed in September 2018. So far, we have precisely one archetype, the FPS Sample, which isn't in a great shape. I guess there's also the Asteroids sample in the multiplayer repository, which is 95% DOTS boilerplate. So don't hold your breath waiting for the others.

    Almost none of the networking functionality will benefit from this because the network is already hundreds of times slower than memory. You are almost never limited by memory throughput or CPU usage when working with network code. The reliance on DOTS here is more of a political move than a practical one.
     
  33. Bardian25

    Bardian25

    Joined:
    Mar 5, 2018
    Posts:
    3
    Sorry if anything like this has already been covered somewhere, or if this is the wrong place to ask, I tried to look on a few forums related to this. Been trying to learn to make a game with a private server (to where players could run their own for free) in unity for years now and can't seem to find good information on networking. Even before the old system was depreciated I couldn't find tutorials anywhere for the LLAPI that resulted in working code. The HLAPI could be an ok jumping off point but I couldn't find anything about how to even customize the terrible login menu. They released the FPS demo and I downloaded that at one point, but it's just diving in the deep end without knowing how to dog paddle. How does anyone actually get their first foothold on multiplayer?
    Is there any simple, actionable information out there for getting started on learning low level networking in Unity without having to wade through a literal complete AAA game worth of scripts?
    edit: just want to be clear when I say "simple" I mean relatively, I do understand networking is not actually very simple at all, have learned the basic concepts theoretically, just no working product yet.
     
    Last edited: Jan 16, 2020
  34. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    8,520
    Currently there is no ready to go fully supported networking with good documentation or tutorials from Unity themselves. Take a look at available 3rd party networking solutions to see if one of them fits with what you are wanting.

    Or if you mean as low level as you can go, look for information on using the standard C# Socket class - the information doesn't even need to be written for Unity specifically
     
    Bardian25 likes this.
  35. Bardian25

    Bardian25

    Joined:
    Mar 5, 2018
    Posts:
    3
    Well that explains the difficulty. Thank you so much for pointing me in the right direction.
     
  36. pantang

    pantang

    Joined:
    Sep 1, 2016
    Posts:
    106
    Will this work with our own servers or are we tied into renting your servers from now on if we want to use this part of the api? I could really use an answer as it could change the direction and engine of my project. Please don't make me install the epic launcher....
     
  37. BHouse

    BHouse

    Unity Technologies

    Joined:
    Jan 10, 2018
    Posts:
    71
    >> cross-posting in several sticky threads; please pardon the repeated message<<

    We understand many of you would like to create multiplayer games / multi-user projects and are challenged by Unity's current state of netcode. We also acknowledge the netcode and workflow requirements can vary based on the projects you're building.

    So, to help us understand how to best to support you, please share your thoughts in the survey below. The survey only takes about 10 minutes, and your feedback will help inform future product decisions. Click here to take the survey by June 8.
     
  38. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    121
    What did you do with the survey from last time (like two years back) when you first announced the collaboration with Google to come up with a joint gaming solution and asked basically the same? Did anyone actually collect those results? Never heard back anything from that one.
     
    MrLucid72 and bigfootaus like this.
  39. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    Hello,
    Why is a survey needed, anyway, would the following be possible, you create a new API but use all the old e.g. function names, to match or make older games easier to move to the new? So only the code under the covers behaves different/better.
     
    MrLucid72 likes this.
  40. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    335
    You just described Mirror :)
     
    khos likes this.
  41. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,024
    True, but what about doing the same but even more simplified / easy to use, ultimately just plugin the network code and not need to make changes, it just works.
     
  42. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    741
    "What is your country?"
    <Taiwan is not in the list>
    Oof. Surely Unity supports human rights and this was not intentional, @BHouse ? I can't seem to select my country.
     
    Last edited: Jun 3, 2020
  43. BHouse

    BHouse

    Unity Technologies

    Joined:
    Jan 10, 2018
    Posts:
    71
    Absolutely not intentional! We used a pre-defined list in Qualtrics, and apparently it isn't included; I'll let the user research team know we need to correct this somehow.
     
    MrLucid72 likes this.
  44. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    741
    <3
     
  45. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    104
    I'm glad you care about if Taiwan is in some country list on a survey but not to read all the forum replies in this forum section, reply the peoples concerns and with actual plans of how Unity will solve this deficit they created in the Networking part of their Engine.

    Networking in 2020 is as important as a renderer in a game engine, when will Unity finally address this?
     
  46. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    273
    Why do people even care about a "official" Unity multiplayer anymore. There are so many different services which are easy to use, support crossplay and many other features and yet some people still act like they can't make a multiplayer game because the Unity team doesn't provide a "official" multiplayer service.

    Yes the (good) services will cost you money, but multiplayer will always cost money, no matter if you host it yourself (good luck with that, because you have to deal with all the support issues) or you pay someone else to host it for you. The "official" Unity multiplayer service will cost money too.
     
    vis2k likes this.
  47. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    104
    It's not about the service though or the hosting, it's about the game integration, Simulating across machines, problems with corrections, determinism, physics, performance, various network conditions, game types.. these problems should be addressed by the game engine developers....
     
    NoxCaos likes this.
  48. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    976
    Going to ask if there will be any follow-ups to the results of the survey?
     
unityunity