Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity Multiplayer Mirror - Networking for Unity (UNET Replacement)

Discussion in 'Connected Games' started by vis2k, Aug 11, 2016.

  1. Gyrase

    Gyrase

    Joined:
    Sep 7, 2018
    Posts:
    3
    It's because the benchmarks are not comparing like for like, and the Magic/load-balancer combination shouldn't be included.

    Which is being tested, low level or high level?
    Really, if comparing low to low the same high level abstraction layer should be used, ensuring it's a fair comparison.
    It's fair to say that the combination doesn't work well, but that's a different statement to what was implied.
     
    nxrighthere likes this.
  2. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    All the tests use the same uMMORPG + Mirror high level abstraction.
    The only difference is the low level transport. Which results in different benchmark results.

    They are comparing low level transports. What do you mean?

    Why? The goal of the benchmark is to show latest transport research.
     
  3. Gyrase

    Gyrase

    Joined:
    Sep 7, 2018
    Posts:
    3
    To make it *fair*, and like-for-like, the number of variables should be reduced.
     
  4. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    179
    @vis2k two short questions since this thread is quite long:
    - is Mirror capable of being built successfully to UWP, MR and Hololens using IL2CPP (as NET is deprecated now)
    - Does it fix the problem of rebuilding client and server all the time even if the change was just a comment in NetworkBehavours?
     
  5. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    156
    @vis2k could you document the version information using in your benchmark for mirror and the low level transports. There is obviously some discrepancy between using ENet and using ENet with mirror and I'm wondering where the problem is and if it has already been fixed?
     
  6. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    682
    @Gyrase we are trying to find the best transport for Mirror. This is not an attack on enet, we want it to perform well so that we can use it more widely. We don't want to make transports, we would have stayed with LLAPI if it worked. We would throw away Telepathy in a heart beat if we find something better.

    The number of variables is exactly the same in both cases. The only difference is the transport.

    Forget about "magic", it is not released, and it is obnoxious to set up. It will never be merged in Mirror; at best it would be an add-on. We are interested in a transport that can beat Telepathy at this moment.

    If there is some configuration we are missing, or some obvious problem in our test, or if you want to test it yourself, please let us know.
     
    Last edited: Feb 21, 2019
    hopeful likes this.
  7. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    682
    Yes, Mirror works in those platforms. I have not tested it myself but I know people have reported success.
    I am not aware of the problem you describe, could you elaborate? Is that an HLAPI bug or was that a Mirror bug at some point?
     
  8. wobes

    wobes

    Joined:
    Mar 9, 2013
    Posts:
    658
    For everyone,

    I would personally suggest to avoid such things as Mirror, Telepathy, Ignorance for various reasons.
    All of three things are not suitable for production or even hobby projects.
    For anyone who would like to know the reasons - you are welcome to drop me a personal message.

    Cheers.
     
  9. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    It used the latest Mirror version, latest Telepathy version and Ignorance 1.2.0rc5 as well as the ENET-CSharp version that comes with Ignorance. This was our first ENET test, we plan to do several more with improved Ignorance versions and with original ENET instead of nx's version.
     
  10. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    45
    I don't really see the point that you wish to change the Enet version, the original one is slower, has more bulk and doesn't have IPV6 support, but by all means try it out.
    The real reason this test was failing is because the implementation (aka Ignorance) of Enet in your library is bad. I explained you the problems with it on discord but the developers seemed like it would be "too complicated" to fix it. even when i exactly explained how to do it.

    Don't spread false information here to people that somehow Enet is inferior to other solutions, because benchmarks have shown that it can handle a lot thrown at it, thousands of clients.. Because it's so simple and straight forward.. just check the code if you can read C,

    I really enjoy the fact that people took up the stick from Unity to fix their HLAPI and help the average small time developer with no networking skills to get his project working with networking, that's great, but you as a head of it Vis2k, that is just not the right path.
    Your all the time trying to defend your work, and weird decisions, like advising people to use a TCP protocol for fast paced multiplayer games.. Even worse, make a TCP library that spawns 2 thread per client and doesn't close them gracefully, once a server runs for a while you have a few hundred threads running.. That is not how CPU's like threads, there will be cache misses, there will be needless context switching.. It's a terrible implementation.

    The biggest problem is not listening to suggestions nor accepting clever PR's on your repository that would improve performance or add functionality that could be used to improve performance.

    The simple concept of a GC free library seems beyond you, whilst you push for LINQ in the hot path, foreach loops. and other things because its "simple and stupid" which is the most silly comment i ever seen. I mean this is basic stuff, were dealing with the Mono run-time of unity here, with a dated Boem GC..

    Like you said yourself, your single thread bound on your library, no big surprise there, but your denying any fixes for it because they are supposedly "magic" and in your eyes less code is better, which makes no sense at all.

    I would very much support this project and add a few PR's if things would be accepted, but I don't see that happening, and right now this Mirror, is actually a trap for developers trying to go from HLAPI to something better, perhaps porting their projects. And that saddens me greatly, Our community needs progress not regress.
     
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,334
    No personal attacks.

    People are welcome to post counter claims or evidence and mature discussion but personal insults are directly against the rules.

    Do not reply to this mod note.
     
    nirvanajie, goldbug and hopeful like this.
  12. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Maybe you are right and it is slower. Networking is very difficult though, we need to try things in production to find the best solution for us.

    Despite the flawed two-threads-per-connection design, there is only one reason why Telepathy is still the default for Mirror: it performs best in our real world tests. I don't like it either, but it is true. I tested a handful of different TCP implementations ranging from simple async-await, to BeginSend/EndSend, to SocketAsyncEventArgs. Both async-await and SocketAsyncEventArgs significantly outperform Telepathy when running tests outside of Unity, e.g. in Visual Studio or Rider. Once we put them into Unity, we see 120 second latency after 50-100 CCU. I'd much prefer the SocketAsyncEventArgs code because it's actually very elegant. But in Unity, Telepathy still outperforms the others and we have to use what actually works best, not what we think works best.

    That being said, we are improving and testing our different transports every day. Something else will beat Telepathy eventually, but the only way to find it is to benchmark everything in production. I don't understand how people can get personally offended by that. It's not like I wanted to do Mirror or Telepathy. The reason why I picked UNET for uMMORPG was so that I didn't have to worry about networking. But when the UNET team abandoned us, no one else wanted to do it.

    Original UNET had 21129 lines of code. We simplified and cleaned it up to reach 11077 lines of code, or in other words: almost half of it. We did not accept many GC optimizations yet in order to focus on cleaner code and better algorithms instead.

    People have been criticizing us for that since day one. But not only did we remove a lot of unnecessary allocations from the original code, we also made significant improvements to the high level algorithms. In many cases we were able to change UNET's O(n) algorithms to O(log n), or similar.

    As result, we scaled UNET's original 50-100 CCU to Mirror's 500+ CCU. An order of magnitude improvement, due to algorithm improvements.

    We are not against GC, but decided to focus on high level code optimizations first. The benchmarks seem to confirm that decision.
     
    Last edited: Feb 20, 2019
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,334
    Well, I'll just point out that there isn't anything more efficient than DOTS / ECS. Blizzard use it, Riot uses it, Unity is working on Using it, and even Photon is now using it with Quantum.

    Personally, I'm going with one of the ECS options because that's scientifically proven to be the best. I do think people should learn to live and let live though.

    Each to their own, but don't pretend this solution will come close to a DOTS/ECS solution though (nothing will, since it mirrors how CPUs work and determinism by default is around the corner).

    So to answer your question - you are doing something right if it is about the coding style you prefer. If you mean "what is the most efficient already proven by science" then that prize goes to anything ECS based. According to blizzard who do it right more than anyone else does.
     
  14. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Fair enough. Some people like ECS, we still like MonoBehaviour. ECS is obviously faster, no doubt.
     
    hippocoder likes this.
  15. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    682
    ECS is clearly faster, I don't think anybody ever claimed otherwise. But it is so darn difficult to use that it is borderline unusable for muggles. Hopefully they improve usability in the future.
     
    Gekigengar, hwaet and hippocoder like this.
  16. wobes

    wobes

    Joined:
    Mar 9, 2013
    Posts:
    658
    I guess it is difficult for you because it needs some knowledge in multithreading and architecture of modern CPUs. And of course switching from OOP to DOD means to write more lines of code which you and vis2k are afraid of.

    Here is a good example of why you guys will never advance yourself:



    500 kb of GC and 400ms to calculate zone of insterests.

    Ridiculous.
     
    Last edited: Feb 20, 2019
    hippocoder likes this.
  17. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,334
    Sadly had to edit the above post. If you're going to attack you can't write about other people's intelligence - it's an insult. You can attack only the data though :)

    Peace, all.
     
    vis2k and goldbug like this.
  18. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    682
    That pull request is a clear improvement over the previous code we inherited from HLAPI. I am not sure why you find it ridiculous that we are trying to improve it.

    Notice the date of that PR, it is a month old, it is obviously dead. The only reason that PR has not been merged (and probably never will be) is because we already have a better implementation of area of interest that does no allocation and does it in just a few milliseconds by using a grid spatial index. That is already in place in ummorpg and my own game. We will probably eventually add it to mirror itself if we can make it easy to use. In other words, just like yourself, we don't think that code is good enough.

    Area of interest as it was written in HLAPI was showing as a clear bottleneck. In general we try to optimize stuff that shows in the profiler. If it does not show in the profiler as an issue we try to keep the code as simple as possible. For example, allocations in Update() are treated much different than allocations when a user connects.
     
    Last edited: Feb 20, 2019
    Padilha and vis2k like this.
  19. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    150
    Yes, I can confirm that they really tested many methods. I was there reading in Mirror discord when they were testing TCP transport in Unity (this is just a CCU test, not real world test). They said that they could easily reach 10k CCU using SocketAsyncEventArgs outside of Unity. But when they used it inside Unity then it could only reach 1,200 CCU. Even fholm tried to help investigating this issue using his old SocketAsyncEventArgs TCP transport. He could get it to 3,000 CCU which was still far less than outside of Unity. They had the conclusion that SocketAsyncEventArgs was implemented poorly in Unity mono. Days later, fholm said that he saw new PR in Unity mono which should fix this issue. But we will never know when this fix will come in Unity.

    Saying that Mirror is a trap or unusable or regress from HLAPI is over-criticize. The biggest trap here is actually UNET. I've tested Mirror and yes it's a lot better than UNET. Well, some people may still said that making something better than UNET shouldn't be hard because the standard is very low. ECS looks very good and should be a better choice for performance but not all people can just easily switch to use it. Many people have already invested their time developing their game using Monobehaviour. Not to mention that Unity themselves said that ECS is not production ready.
     
    jolix, nirvanajie, Player7 and 2 others like this.
  20. Alexees

    Alexees

    Joined:
    Nov 8, 2017
    Posts:
    179
    @vis2k thanks for the answer, nice to hear.
    I was talking about the HLAPI, did a quick search and found you answering a Forum post related to this. I think that solves it for Mirror.
    To recap: it was usually sufficient to do a minor change to a networkbehaviour only to receive differently assigned netIDs when building a scene compared to before. Server and Client went constantly out of sync and you had to be careful to build out both with the exact same code.
     
    vis2k likes this.
  21. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    95
    Hi everyone. Seems like after UNet deprecation, Unity removed Multiplayer tutorial from its "Learn" section. Where to find it now? It was convenient to check that tutorial, creating my own multiplayer game from scratch (especially if I forgot a workflow).
     
  22. bingofly

    bingofly

    Joined:
    Sep 15, 2018
    Posts:
    24
    Hello guys.
    No matter what others say about Mirror, after a few days of testing, I wanna say that I like it. Many thanks for your effort.
    I have some questions here. The NetworkManager contains two variables such as OnlineScene and OfflineScene. Dose that mean I can have only one onlineScene?
    In order to test, I keep OnlineScene and OfflineScene null and use my own code to load scenes.Firstly I start a host, then I start a client and connect it to the host. I find that the remote(host) player is synchronized in the offlineScene of client automatically. After that, client load onlineScene use my code and destory remote player by default.So errors emerge.
    Maybe it's a stupid question, I wanna know how can I synchronize players from one scene to another. Dose Mirror support more onlineScenes or just one?
     
    Last edited: Feb 24, 2019
  23. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    https://vis2k.github.io/Mirror/
     
  24. GuiTeK

    GuiTeK

    Joined:
    Apr 28, 2017
    Posts:
    9
    Hi @vis2k,

    Thank you for developing Mirror!

    I'm starting a new turn by turn MMORPG project and I need a networking solution with Unity. The official networking solution, UNet, has been deprecated, and the official replacement hasn't been released yet. So it seems like Mirror is my only choice left (and it seems pretty good so I'm glad)!

    However, I have a few questions:
    • Does Mirror allow to make an Authoritative Server? By authoritative, I mean that everything is managed by the server, including all the players. I'm asking because I read Unity User Manual - Network Authority, and it seems that for UNet, "Server Authoritative" means "everything but the players": "This means - for example - the server would manage control of all collectable items, moving platforms, NPCs - and any other parts of your game that players can interac and player GameObjects have authority on their owner’s client (meaning the client manages their behavior)."
    • If the answer to the previous question is yes: is it the "default behaviour" or does it require extra work to build an authoritative server?
    • Does Mirror depend on any external service (e.g. matchmaking service)?
    • Is deploying an online game server as easy as running the game in server mode and distributing the IP to the clients?

    Thank you!
     
  25. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    682
    Yes, Mirror is designed for authoritative server. A client cannot change any data on the server. As you say, everything is managed by the server including all the players. Suppose a user wants to buy an item from the store. The client cannot just add the item to your inventory. You can try, but all it would do is add it to your client inventory, the inventory as seen by the server and other clients would still be unmodified. The only way for a client to make a purchase would be to send a [Command] call to the server. Your Command method would check if the player has enough money, deduct the amount and add the item to the inventory.

    Keep in mind that you have to design your game correctly. If you have a CmdPay and CmdAddToInventory and you expect that people will call pay before adding to inventory then you messed up. Someone could hack the client and call CmdAddToInventory without paying. If instead you make a CmdPurchase that does both operations, then it can't be hacked.

    Yes, this is the default and only behavior. Clients cannot modify data on the server period. The only way to do it is to call a [Command] or send a Message. Your server is always the one that changes things.

    No. We have a Lobby class that does it. If it does not work for your needs, you can just extend it or write your own with ease.

    Yes, that is all it takes. You can try it with some of the provided examples.
     
    GuiTeK likes this.
  26. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Progress: stress testing 0gc branch: https://github.com/vis2k/Mirror/pull/443 with uMMORPG and a 16 core server.



    Found a giant bottleneck while stepping through main loop to minimize GC. NetworkServer.SendToAll/Ready/Observers previously constructed the message for each connection (420 x 420 players). Now it only constructs it once and sends it to all connections (1 x 420 players). This combined with some NetworkWriter caching results in:
    * half the CPU% at 200 CCU
    * 1/3 the latency at 420 CCU
    * 165 ms instead of 450 ms latency at 420 CCU

    Pretty sure this just doubled CCU again.
     
  27. NoobDoAAA

    NoobDoAAA

    Joined:
    May 7, 2018
    Posts:
    11
    I think that we all agree that ECS is great.
    But it is not ready for production yet. When? With Unity 2019 LTS maybe?
    For those who can't wait Mirror is a great UNET replacement.
    My short article about Unity networking in the beginning of 2019 - http://noobdoaaa.com/read=9
     
    goldbug likes this.
  28. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    39
    Ahhh E-net. Error error error error error error. Screw that. I'm not picking apart that S*** to get it to work. I don't care about ticks. Mirror is fast enough for me and it imports perfectly. Can't even find any video documentation other than some circle jerk video showing some cylinders moving around. Before mirror I couldn't run my game without it crashing. Now I have had 6 months with zero problems. Its not just about code. Its about support and implementation which you have a lot to learn about.
     
  29. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
  30. bingofly

    bingofly

    Joined:
    Sep 15, 2018
    Posts:
    24
  31. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    I recommend to use Unity 2018.3.6.
    • We had to upgrade from 2017.4 because of a deadlock bug where Unity would freeze on OSX within 5-15 minutes while the network was active. This disappeared in 2018.2 version with .NET 4.X.
    • We had to upgrade from 2018.2 to 2018.3.6 because of a memory leak in Unity 2018.2, which disappeared in 2018.3.6.
    So for multiplayer games, 2018.3.6 is the only stable version at the moment.
     
  32. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    682
    Mirror just got the biggest change since the SyncList rewrite. You can now send messages without worrying about ids. Since HLAPI, when you sent a message, you provided an ID that was unique and a Message object that provided the associated data.

    Before
    Code (CSharp):
    1.  
    2. // you needed a unique id and pray nobody else
    3. // was using it
    4. const ushort MyMessageId = 55;
    5.  
    6. // then you declare your message data
    7. class MyMessage
    8. {
    9.     public string name;
    10.     public string lastname;
    11.     // and whatever other variable
    12. }
    13.  
    14. // this is how you send it
    15. conn.Send(MyMessageId,   new MyMessage(...));
    16.  
    After
    Code (CSharp):
    1. [B][/B]
    2. // Declare your message data
    3. class MyMessage
    4. {
    5.     public string name;
    6.     public string lastname;
    7.     // and whatever other variable
    8. }
    9.  
    10. // send it with no id.  Mirror figures out an unique id for MyMessage
    11. conn.Send(new MyMessage(...));
    12.  
    Receiving is now much simpler too.

    Before
    Code (CSharp):
    1.  
    2. conn.RegisterHandler(MyMessageId,  myHandler);
    3.  
    4. public void myHandler(NetworkMessage netMsg) {
    5.    // ewwwwwww
    6.    MyMessage msg  = netMsg.ReadMessage<MyMessage>();
    7.     ...
    8. }
    9.  
    After
    Code (CSharp):
    1.  
    2. // the class itself is the id
    3. conn.RegisterHandler<MyMessage>(myHandler);
    4.  
    5. public void myHandler(NetworkConnection conn, MyMessage msg) {
    6.     ...
    7. }
    8.  
    To make it easier for you we kept the old API, but we have [Obsoleted] it. If you upgrade and you start getting warnings, your app will still work, but you should be migrating to the new Message API as soon as you can.

    Note this does not affect [Commands] and [*Rpc] (which is what you should be using the most) those work the same as before.
     
    NoobDoAAA and hopeful like this.
  33. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,383
    Can you update/expand the example scene with some of these new features and changes thanks
     
  34. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    95
  35. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    39
    Would it be difficult to allow the Network Transform and Network Transform child to select between syncing localposition and localrotation?
     
  36. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    39

    Ok I have modded an independent Network Transform script that does this if anyone wants it message me. Would be nice to enable this feature as part of mirror as standard though.
     
  37. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Can you explain why this would be necessary?
     
  38. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    137
    Hi vis2k, just had a quick question. Mirror is supposed to be a replacement for UNET, which btw I am loving mirror:)
    However, I see in one of the classes for Telepathy (that comes in mirror folder), it uses UnityEngine.Networking;
    When unity delete UNET, this will be gone correct? So how can you keep mirror going if it is using UnityEngine.Networking?
     
  39. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    You probably saw the LLAPITransport - which is our Transport for Unity's old low level networking that came with UNET.
    Unity plans to support that until 2020 I believe, so we'll keep our Transport to support it. This way people can migrate to Mirror more easily.

    Mirror doesn't rely on UnityEngine.Networking though - we can remove that transport any day and Mirror will still function.
     
    iSleepzZz likes this.
  40. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    52
    @vis2k, @goldbug

    Messaging Is Broken (or will be soon) - Message Id Deprecated

    Can you please NOT remove the Message Id parameter from the long established messaging interface that we have all been using for several years now? By removing the message Id you are adding a lot of overhead for people who use messages extensively. I have upwards of 20 message handler functions. Many of my messages pass the same message header class back and forth among them. Your new version basically makes this impossible since it seems to lock a message class into a 1-1 relationship with a single message handler function.

    FYI - It is FAR easier to maintain a simple list of integer message Id's than to maintain a list of pointlessly duplicate message header classes that all contain the same data.

    - ants
     
    Vincenzo likes this.
  41. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    We can change/revert features easily, so don't panic :)
    You should try the new automated message ids though. It did make the code more simple when applying it to my assets. And we will be able to remove a whole 300 lines of useless Mirror code because of that soon.
    Another upside is that using third party assets/addons will be a lot easier. You won't have to worry about addon's message ids clashing with each other.

    But if you tried it and still think that it sucks then please let us know.
     
  42. bingofly

    bingofly

    Joined:
    Sep 15, 2018
    Posts:
    24
    Thank you, Vis2K, I've fixed it by myself.
     
    vis2k likes this.
  43. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    137
    Hey vis2k, a quick question.
    So I am using the latest version of mirror on unity 2018.3.6f1

    Currently what I've been doing is keeping a SyncVar of my position as a Vector3 and then whenever it moves, just have all the clients smoothly lerp to the new position.
    Do you believe it will be more network efficient to instead just use mirror's network transform component?

    P.S. my game is a multiplayer survival fps
     
  44. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Try it :)
     
  45. Roamer79

    Roamer79

    Joined:
    Oct 25, 2016
    Posts:
    39
    Sure! Lets say you want to allow players to all get in the same non-controllable movable network object such as a boat or car (that isn't a player object) you will have a jerky player due to lag or compensation between the two networked objects in world space. If you do the same thing as local positions and rotations no jerky jerk as it is only concerned about the local co-ordinates and ignores the parent (being the car or whatever). If you sync an object as local position that isn't parented to anything it just becomes world position anyway and automatically switches from world to local from what I can work out. I just sync everything as local space and I can parent and unapparent without any fuss. Does this make sense? If you have any other ideas on how to get around this I am all ears!!
     
  46. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    A custom NetworkTransform is probably the best solution for those who need it.
    Will have to think about that one. Using localPosition by default might introduce other issues for other users.
    If you use a custom NetworkTransform then that should be fine for now. You can find our NetworkTransform code on Github.
     
  47. Vencarii

    Vencarii

    Joined:
    May 19, 2016
    Posts:
    9
    I began a personal game project. The small prototype I have so far works fine with UNet.
    I tried to switch to Mirror, but when I start the game as Host outside of Unity I get the error "NullReferenceException: Object reference not set to an instance of an object". I looks like it has something to do with LocalPlayerAuthority on a non-player GameObject.
    What would be the easiest way to get support for this?
     
    Last edited: Mar 6, 2019
  48. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Post the full error message including stack trace
     
  49. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,133
    ~130 lines of code were removed. Not 300
     
  50. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,217
    Yes. And we 'will be able to remove a whole 300 lines of useless Mirror code because of that soon.'

    See the link in the PR that we didn't merge yet.