Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

[Netcode] WorldRenderBounds missing on Server

Discussion in 'NetCode for ECS' started by padhont, Mar 27, 2020.

  1. padhont

    padhont

    Joined:
    Oct 1, 2015
    Posts:
    22
    Hey,

    When using the ConvertToClientServerEntity component, my prefabs get converted to entities just fine,
    but on the server they are not being rendered.
    As an example I just have a cube, with a simple movement component, underneath the convert component, once set to server only, once set to client only. (create and destroy)
    I then start in editor and create server, or client respectively.
    In Clientworld the entity that gets created has a WorldRenderBounds component, which is missing in the server world. Guessing that one is important for rendering my cube, or at least maligning it not get culled?
    See images below for a more visual indication of my problem.
    Am I missing something, is this how it is implanted right now, is it a bug? And can I maybe hack in a WorldRenderBounds component? Would be handy for testing ;)
    Have a nice day, and stay safe and healthy out there!
    Pieter


    On the clientworld
    ClientConversion.PNG
    And on the server
    ServerConversion.PNG
     
  2. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
    A server is not supposed to render anything, that's why.
    Rendering only works client side and that's how it should be done anyway as the server itself is "headless".
     
  3. padhont

    padhont

    Joined:
    Oct 1, 2015
    Posts:
    22
    So you are saying it is by design?
    Because for the GhostEntites you can toggle on and off rendering on the server I think.
    I should test that as well, but there is definitly some toggles for rendering on the server.
    It would be handy to test with som erendering way, and once you use it you just run it headless so it doesn't render anyway.
     
  4. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
    You can just toggle if the server ghost should have the render components, which is pointless atm as the server has no rendering system at all.
    If you want to render something and still want the server systems to run, you have to run the server and client world at the same time.
     
  5. padhont

    padhont

    Joined:
    Oct 1, 2015
    Posts:
    22
    Ok, that is unfortunate
    Is there a way of adding it in by hand?
    Just to see something if I am testing a build.
    If not I can probably make someting work with normal prefabs for the few thing I really wanna see while testing

    Thanks anyway ;)
     
  6. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    234
  7. padhont

    padhont

    Joined:
    Oct 1, 2015
    Posts:
    22
    True, but I am thinking more when testing in a build,
    I have overwritten the bootstrapper so I can start a client or server with a command,
    but I think that breaks the play mode tool to run both at the same time?
    It's oke, just wanted to verify if I was missing something silly.

    Thanks for the help! :)
     
    emkusa likes this.