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

DOTS NetCode 0.4.0 released

Discussion in 'NetCode for ECS' started by timjohansson, Sep 17, 2020.

  1. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    We have released version 0.4.0 of DOTS NetCode.

    The main changes apart from bugfixes are support for generating the serialization code for ICommandData and a change to how prefabs are generated which enables client and server in the same standalone build.

    We are also deprecating ConvertToClientServerEntity in favor of sub-scenes, and removing fixed timestep on the client since there are no longer any known cases where it has a benefit over dynamic timestep.

    Changelogs will be added to this message when they are published.
     
    saskenergy, NotaNaN, Samsle and 8 others like this.
  2. FakeByte

    FakeByte

    Joined:
    Dec 8, 2015
    Posts:
    147
    What has changed in the new Unity Transport 0.4.1 version?
     
    JakHussain likes this.
  3. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
    docs don't seem to be up yet for netcode under the "latest" url and even when i explicitly type the version number for 0.4.0. This is also true for transport.
     
  4. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    There's a new utility method for checking the number of pending events in a NetworkDriver (NetworkDriver.GetEventQueueSizeForConnection), and a small compatibility fix for dots runtime.
     
  5. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    not sure I understand what this means. If we have objects on client which are predicted and need to run on fixedUpdate, does that still work?

    Or is it just msg sending/reception that now works on variable timestep?
     
    Last edited: Sep 17, 2020
  6. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    23
    Looks like a small update, I imagine you have worked on several other NetCode aspects.
    Burst is still behind the verified version...

    Are there any plans to release a version of Unity NetCode compatible with a standard project without the use of Entities? Because I imagine that Unity foresees a solution also for the projects without the DOTs, but the traditional use of GameObject and Momobehaviour?

    I like DOTs, but when you've already coded thousands of lines of code, redoing everything in DOTs with incomplete physics isn't really ideal.

    Thank you for the feedback ;)

    upload_2020-9-17_13-9-16.png
     
  7. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    954
    Thanks for the update!

    Hm, that was already working for me. I'm a little confused what changed.
     
    florianhanke likes this.
  8. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    Prediction still runs at a fixed timestep (with fractional ticks for interpolation). The change is that running the entire client update at a fixed rate with `FixedClientTickRate` no longer is possible. That will only affect client-only code which is not used for prediction. If you need client-only logic to run with a fixed timestep you can move it to FixedStepSimulationSystemGroup instead.
     
  9. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    There are no plans to run DOTS NetCode without entities at the moment. It is still possible to run parts of the simulation in GameObject by copying data over or using hybrid components, but if you want to not use entities at all this is probably not the right solution at the moment.
     
  10. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    The change was that it is now possible with sub-scenes and not just with runtime conversion.
     
    florianhanke and Enzi like this.
  11. UsmanMemon

    UsmanMemon

    Joined:
    Jan 24, 2020
    Posts:
    87
    "Stable, supported, and extensible netcode foundation for current Unity (GameObjects). " - Unity Blog "The road to 2021"

    GOs might get some multiplayer love in 2021.
     
  12. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    23

    So I will be able to use Unity NetCode with my project. @timjohansson will this be some kind of Dots and non-Dots Hybrid? Or it will be an extension that does not use the Dots. I try to predict the shot during development, it's a pretty big game, so I don't want to miss my shot.

    thanks
     
  13. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    Be careful though. Implementing networking later in development very very often ends up in a catastrophe. Networking needs to be one of the very first things you implement in your game so that you can build all of your game systems on top of it and test them as you go, otherwise it's going to be a nightmare. I would recommend sticking to whatever solutions are available right now (mirror, MLAPI, photon) for your current project, and then for your next project you could evaluate if you want to start it in DOTS and use NetCode
     
    NotaNaN, Lukas_Kastern and JoNax97 like this.
  14. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    305
    I also want to pipe in as a complete newcomer to netcode and say that the documentation "getting started" is now out of date.

    Please, I would like to start on a small experimental project without a major part of the code under the threat of complete deprecation.
     
  15. FakeByte

    FakeByte

    Joined:
    Dec 8, 2015
    Posts:
    147
    NetCode is still in preview, if you start now then there might be a risk of breaking changes, you either live with it or wait until it is out of preview I guess.
     
  16. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    305
    True. It's been in preview for years now and I'm fairly decent with standard DOTS. Mainly just the jobs workflow, not entities.

    I've been trying to test the waters with multiplayer in a new prototype but seeing how I cant even move past step 1 in the Getting Started without a deprecation message makes me very sad.

    But as everything with Unity, I guess I'll have to grit my teeth and go trial and error my way through. I guess the quality of documentation hasnt changed in the 4 month break. Such is life and Unity especially.
     
  17. SirKnightDragoon

    SirKnightDragoon

    Joined:
    Mar 22, 2016
    Posts:
    23
    I know. I am not in my first multiplayer game. I want to use NetCode for its speed of execution with a "low latency". And go there with a dedicated server on an expandable hosting cloud.

    Currently we are focusing on assets, level design, navigation, connection, matchmaking etc, anything that does not require a networking system.

    I would be curious to know a real equivalent to what NetCode promises in terms of Dedicated Server and communication below 100ms, for example 30ms like any good competition game.

    Being able to develop the server and client side directly in Unity is very beneficial.

    I would theoretically be ready to use Unity NetCode, but unfortunately at this stage it is not sufficiently advanced on the physics side with Dots.

    The car driving system is far too advanced and uses current Unity physics. The Dots version lacks a bit of love ...

    We also use Houdini for a lot of Assets and this can cause problems when generating objects that use non-dots components.

    If you have any advice on such a powerful alternative, I'd be curious to look.

    thanks
     
  18. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    954
    Is there a recommended way to sync DynamicBuffers in ghosts?
    Right now I'm converting buffers to bytes and sync them via FixedStrings which doesn't feel right but it works as long as the size is not exceeded.

    I thought about working around DynamicBuffers altogether, then I need to model them as seperate ghosts but I'm unsure if that's good design and could lead to other problems.
     
    Justin_Larrabee and adammpolak like this.
  19. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    I am pretty sure they are different teams and initiatives. They have been trying to hire a whole new big team to develop a new UNET for classic Unity with GameObjects. Separate from Unity DOTS NetCode.
     
    bb8_1 likes this.
  20. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    I'm having trouble making standalone builds from the latest samples out-of-the-box. What all is required? I know things just changed with standalone builds. I am getting this error:

    Could not open file C:/projects/multiplayer/sampleproject/Builds/NetCubeServer/MultiplayerSample_Data/StreamingAssets/SubScenes/b3b4427e1963245ed97bcf69eaca92da.entityheader for read (Filename: C:\buildslave\unity\build\Runtime/File/OpenFileCache.cpp Line: 61)

    There is no StreamingAssets folder being created for the build.

    I have added both NetCube and the NetCubeClientServer to "Scenes in Build" and check-marked them. I have tried this with NetCube as well as Asteroids sample.
     
  21. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    Hello,

    I've been experimenting with Unity NetCode samples as well as my own experimental project. I was able to take advantage of the Importance/Distance/Age snapshot mechanics pretty easily to optimize bandwidth in scenarios with a lot of ghosts that I'm looking to support. This is working pretty well, nice job!

    However, I'm having a bit of trouble getting consistent smooth interpolation. There are a number of ways to encounter jittery movement or rubber-banding or problems in prediction. But for this post I'm focusing on the simplest possible reproducible example of an Interpolation issue from the samples.

    If you stress test Asteroids by making the Level Size around 800x800 and with 500 Asteroids, it can no longer ensure really fast snapshot updates for the on-screen asteroids. This scenario is important to actually test interpolation. In this case, let's say your GhostConnectionPosition is at the top of the level, so the ones at the bottom are de-prioritized and update less frequently. That's fine and good, but my issue is that the interpolation is not smooth enough.

    I've created a short video showing this exact scenario in Asteroids sample. I'm sorry that it's a bit hard to see in a compressed video, but when you look closely you can see what I'm talking about. The asteroids at the top are updating frequently and smoothly, and the asteroids at the bottom are updating less frequently, but shouldn't they be interpolating smoother?



    This is without inducing send/recv delay, or changing NetworkTickRate down from 60.

    Are there any existing mechanics I can use to smooth out interpolation from Unity NetCode? Are there known issues with interpolation?

    Thanks!
     
    cdm456852 likes this.
  22. cdm456852

    cdm456852

    Joined:
    Nov 21, 2017
    Posts:
    33
    The same problem with me,if a entity which is interpolated from server to client, it's movement is jitter.
     
  23. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,113
    I really hope dun deprecate ConvertToClientServerEntity until hybrid classic game object solution is working properly. It's essential for my current game project. Currently after placing GhostCollectionAuthoringComponent into sub-scene, it will just directly instantiate classic game object before I instantiate entity from GhostPrefabCollectionComponent in actual player build. When instantiate entity from GhostPrefabCollectionComponent, it will instantiate several classic game object instead of just only one classic game object. Surprisedly it's working properly in Editor.
     
  24. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    We are working on serialization of DynamicBuffers, but I don't have an estimate of when it will be released yet. Which workaround is best until then depends on your exact use-case, either split them into multiple entities in a ghost group, create a container component with multiple instances of the struct you want to sync or write a custom serializer.
     
  25. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    You have to build using the new build settings in Assets/BuildSettings, otherwise the entities subscenes will not be included.
     
  26. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    The interpolation code assumes it will only lose at most one packet and sets the interpolation delay accordingly. Having more things than you can send clearly visible like you do will introduce uneven movement unless you increase the interpolation delay significantly. The interpolation delay is currently not exposed so you can tweak it, it seems like it would be a good idea to expose that to handle cases like this (It's NetworkTimeSystem.kInterpolationTimeNetTicks if you want to try it out yourself).
     
  27. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    Thanks Tim, I was able to try it out by modifying the script in PackageCache. Setting kInterpolationTimeNetTicks to 8 instead of 2 does indeed fix the situation I demonstrated in the video with the Asteroids sample. Perhaps that would be a good candidate for a new member in ClientServerTickRate.

    Speaking of ClientServerTickRate, there is a major issue that I'm encountering which is easy to reproduce using the NetCube sample. Interpolation seems to break down if you set SimulationTickRate=10 and NetworkTickRate=10. To do this in the NetCube sample, change the Ghost Mode on the Cube prefab to Interpolated (not Owner Predicted), and then edit Game.cs to supply a ClientServerTickRate singleton right before the server Listen code, like this:

    Code (CSharp):
    1.  
    2. else if (world.GetExistingSystem<ServerSimulationSystemGroup>() != null)
    3. {
    4.     world.EntityManager.CreateEntity(typeof(EnableNetCubeGame));
    5.  
    6.     // Add ClientServerTickRate injection here
    7.     var tickRateEntity = world.EntityManager.CreateEntity();
    8.     world.EntityManager.AddComponentData(tickRateEntity, new ClientServerTickRate { SimulationTickRate = 10, NetworkTickRate = 10, MaxSimulationStepsPerFrame = 4 });
    9.  
    10.     // Server world automatically listen for connections from any host
    11.     NetworkEndPoint ep = NetworkEndPoint.AnyIpv4;
    12.     ep.Port = 7979;
    13.     network.Listen(ep);
    14. }
    15.  
    The cube moves with major jitter with these settings. Why is that?

    Thanks!
     
    Last edited: Sep 23, 2020
  28. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    I could not see any obvious increase in jitter with those settings when I tried locally. You will get very uneven frame-rate if you run that setup with unlocked framerate though, since you'll only do significant processing 10 times / second. Does it get better if you enable v-sync?
     
  29. Kelevra

    Kelevra

    Joined:
    Dec 27, 2012
    Posts:
    87
    @timjohansson Hello! Could you please explain the main reason behind the deprecation of ConvertToClientServerEntity? Will it be possible to reproduce old behavior but with a custom conversion component?
     
    bb8_1 likes this.
  30. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    Thanks for looking into this. VSync Count is set to Every V Blank, and I just tried all of the settings and they didn't seem to help. Also I'm not sure exactly what you meant by "You will get very uneven frame-rate if you run that setup with unlocked framerate though, since you'll only do significant processing 10 times / second."

    Did you switch the Cube to Interpolated? That is required to reproduce the issue. For some reason with tickrate 10/10, NetCube moves smoothly as Owner Predicted, but moves erratically as Interpolated.

    I made a short video where I start with default tick rates (60/60) showing the cube moving smoothly (set as Interpolated), and then I make the code change to tickrate 10/10 and show it moving erratically. (the rubber banding is a little hard to see in a compressed video, but I think you can tell). This feels like it could be an actual bug.

     
  31. Stroustrup

    Stroustrup

    Joined:
    May 18, 2020
    Posts:
    142
    how do you choose the destination world in subscenes?
    in which world do they end up?
     
  32. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    That is not the vsync setting I meant and it is as far as I know not applied to game mode. In the game mode window there is a dropdown which usually has the text "Free aspect". If you expand that there is a checkbox for "VSync (Game mode only)". The stats overlay in the video indicates you are running in way more than 60fps, so unless you have a 244Hz monitor it is likely not enabled.

    Yes, I changed it to interpolated. For owner predicted netcode will use the simulation code to get smooth movement instead of any form of interpolation - so it's a completely different path and I should behave differently with different tradeofs

    I mean if you run in 60fps with 10Hz simulation rate your CPU frame time will be something like:
    5ms, 1ms, 1ms, 1ms, 1ms, 1ms, 5ms, 1ms...
    Because only 1 out of 6 frames run simulation the frames that do will take much more time
     
  33. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    They will end up in all worlds, but they will be converted differently depending on the NetCodeConversionSettings you add to your build settings assets. You also need a system which tells the sub-scene system which version of the subscene to load, see https://github.com/Unity-Technologi...pleproject/Assets/Samples/ConfigureSystems.cs . The hashes in that file is the guids of the Client and Server build settings assets.
    You can write custom conversion systems which reads the NetCodeConversionSettings if you need to do something else.

    If you do not use NetCodeConversionSettings or a setup like ConfigureSystems.cs it will load the same subscene on both client and server - then adapt the prefabs and ghosts at runtime.

    When placing an instance of a ghost in a sub-scene it will be assigned the same ghost id on both client and server and start replicating without going through the regular ghost spawn flow, this is called a pre-spawned ghost
     
  34. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    The main reason is that our conversion needs editor-only state for some features. For example if you specify GhostDefaultOverrides those are only available in the editor, not the player. Because of that doing conversion at runtime is not reliable and there are some features that will not work as expected. With sub-scenes all conversion happens in the editor and the player does not need that editor data. Making ConvertToClientServerEntity work in all cases would be a lot of work, and since the sub-scene workflow is the recommended way in entities as a whole we are focusing on that workflow.
    It should be possible to do pretty much everything with a sub-scene that you could do with ConvertToClientServerEntity, apart from a few corner cases with mixing GameObjects and Entities. It is also not as easy to convert something on the server only, but instead we have support for pre-spawned ghosts so there should not be much need to spawn ghosts only on the server anymore.
    Which part of the old behavior specifically is it you cannot reproduce right now?
     
  35. whilke

    whilke

    Joined:
    Dec 29, 2016
    Posts:
    7
    So what is the solution for hybrid where one wants to mix GO and entities now? And more importantly tie the two together via transform/entity tracking/etc.

    That was mostly easy to do with the old conversion system since it happened against a GO/prefab. Subscenes have no GO data at all, so do we need to now load a subscene + an associated GO scene and figure out a way to associate the objects within each to where they belong?
     
  36. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    I tried building the Asteroids demo with Win_Server and Win_Client build configs, and then starting the server and the client executables, but the client stays a black screen forever. And there are no errors in the build process or in the build's development logger window.

    Is there a step I'm missing?

    EDIT: Found the culprit: it doesn't work on 2020.2, but it works on 2020.1
     
    Last edited: Sep 27, 2020
  37. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    100
    @timjohansson or anyone else who knows details : How to use subscenes instead of ConvertToClientServerEntity - manual doesnt explain this(thx in advance)

    also anyone knows why site https://gametorrahod.com is down - there were tons of dots related valuable infos?
     
    Kmsxkuse and florianhanke like this.
  38. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    @bb8_1 What exactly are you looking for?

    Loading/Unloading of SubScenes can be done through the SceneSystem of the world.

    You specify the scene you want to load by its asset GUID which you can get by using something like https://gist.github.com/LukasKastern/10b6a36974f3856aa5d6708793edaac3

    My experience with replacing the ConvertToClientServerEntity scripts was pretty smooth overall.
     
    bb8_1 and florianhanke like this.
  39. florianhanke

    florianhanke

    Joined:
    Jun 8, 2018
    Posts:
    426
    I, personally, am a bit confused what subscenes are for, exactly – that may be due to the naming.
    As far as I understand, they are – for one – for running the conversion to entity ahead of time, when working in the editor in a background process.
    To use them, I create subscenes and reference them via the SubScene component in scenes. I use GOs with that SubScene component in the Ghost Collection Authoring Component.

    Because of the name, I am a bit confused whether they are for all "things" which can stand on their own, for example I should be making a gun subscene, a soldier subscene, a tank subscene...? But to get that, I need to introduce a separate first-class member of the Unity world (some sort of indirection), subscenes.

    I'm probably also confused because if I had to design a thing like that I would have made a Component called "ConvertToEntity" that I could stick on Prefabs, which then would cause that Prefab/scene object to be converted ahead of time.
    The above is not meant as a criticism – I am new to Unity – but just from my point where I am, the whole usage and naming of subscenes is confusing and so far introduces more work.

    If I am wrong on using subscenes for "normal" game objects or if completely misunderstand subscenes, I'd be thankful to hear where I am wrong :)
     
    Last edited: Sep 28, 2020
    bb8_1 and Lukas_Kastern like this.
  40. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    The naming also confused me quite a bit. Before DOTS I always did associate subscenes with extra scenes like ClientUI.

    But when you look at the actual functionality of subscenes they are more like baked runtime entities.

    I currently just put all the entities that belong to a 'level' into one scene.
    I also have a level independent subscene that holds stuff like the GhostCollection.
     
    florianhanke and bb8_1 like this.
  41. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    I was also trying out the multiplayer sample builds this weekend. I am on 2020.1 and it works for me as well. Unless I add Live Link. When I do, the client fails to do anything, and prints no errors. Is it possible to use Live Link with Asteroids or NetCube? If so, what is required? Note that I am able to get Live Link working with the ECS sample for it.
     
    bb8_1 and PhilSA like this.
  42. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    100
    Lukas_Kastern and florianhanke like this.
  43. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    How do you disable LiveLink? Is it just by not adding LiveLink to the build config?

    I have managed to make successful builds of the Asteroids project, but in my own project I'm still getting the problem of not being able to connect to anything in builds, and I've copied the same build configs as in the sample project
     
    Last edited: Sep 29, 2020
  44. florianhanke

    florianhanke

    Joined:
    Jun 8, 2018
    Posts:
    426
    I'm liking this idea a lot since I don't need to create per-object subscenes. Thanks, Lukas :)

    Am a bit confused as to why it would not work in 0.3:
    Screenshot 2020-09-29 at 13.29.00.png
    I understand that ghost prefabs only make sense in the client or server worlds, but I'd still like to convert them ahead of time. I guess this only works in 0.4+?

    Edit: Yes, that was it, thanks again. Otherwise upgrading was easy. The only thing remaining is how to get a subscene to only spawn on the client or server...
     
    Last edited: Sep 29, 2020
    bb8_1 likes this.
  45. jposey

    jposey

    Joined:
    Aug 14, 2014
    Posts:
    16
    Yes, as far as I know.
     
  46. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    question: how would someone decide to sync Translation (for example) for certain ghosts, but not for others?

    With [GhostField] or IGhostDefaultOverridesModifier, I'd know how to always sync a given field on all ghost prefabs, or never sync that field on any ghost prefabs. But how can we turn it off only on specific ghost prefabs?
     
    tagergo likes this.
  47. TRS6123

    TRS6123

    Joined:
    May 16, 2015
    Posts:
    246
    @PhilSA I would use IGhostDefaultOverridesModifier to remove the Translation entry and create a struct implementing IComponentData (let's call it NetworkTranslation) that is synced. You would then need a system that copies the NetworkTranslation value to Translation.
     
    Lukas_Kastern likes this.
  48. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    If things get baked into static subscenes, what is the solution for not needing to reference every single syncable entity in that subscene? The memory footprint alone (materials, meshes, etc) could quickly blow any budget you might have, even on PC. Additionally, if a content creator wants to make a new entity they are expected to go open that shared subscene, add it, bake it, and hope there isn't a unresolvable merge conflict with other creators on the team?

    I'm not confident I understand the use case being optimized for by the team. Most genres I can think of have many, many different entity types they might want to sync, but not be required to load *everything* to do so. MOBAs? 100+ heroes, at most 10 active at a team. Overwatch? Same. An MMO? Oof, can't even count.

    I can come up with ways of working around some of these issues (and will be forced to in our game for the reasons mentioned above) by runtime pasting visual entities onto the network entities (or vice versa), but it always ends up feeling counter to your goals of being able to sync your gameplay entities and have it (mostly) just work.
     
    Last edited: Sep 30, 2020
  49. talila

    talila

    Joined:
    Mar 6, 2015
    Posts:
    26
  50. Kelevra

    Kelevra

    Joined:
    Dec 27, 2012
    Posts:
    87
    Hello @timjohansson . I've not updated yet due to the schedule but came up with few examples where I see potential problems.

    Here a few examples:
    1. First of all. Till DOTS get feature parity with Unity it's vital to support the Hybrid approach no matter what. Animation, Rendering, VFX, Sounds they all will be used if you really want to work on your project right now.
    As I remember, Sub-scenes don't support "inject" conversion method. Correct me if I'm wrong. So If I want to create a hybrid entity (not a ghost) and place it on a scene I need to write my own conversion script to be able to inject it to the client and server worlds.

    2. Some entities that should exist only on the server (not a ghosts) like special trigger zones that register the player's entrance/exit. Even if I will use subscene and some stripping mechanism that will remove it from the build I will be forced to explicitly mark a system that works with those entities as server only, otherwise, it will work for client and server worlds in the editor.

    3. Spawn at runtime hybrid objects that require client or server conversion.

    I've already added my own ConvertToEntity script to prevent entity creation in ThinClients so maybe it's not a big problem.

    And a small note about removing an ability to set a number of clients to create. I think that it could be a great booster If we had an ability to play as different player in one editor but looks like that you don't have plans to support that out of the box. (Like this
    )
     
    Kmsxkuse, bb8_1 and Justin_Larrabee like this.