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

entities does not show in an independent client but only in the editor.

Discussion in 'NetCode for ECS' started by sc03275sdo, Jun 2, 2022.

  1. sc03275sdo

    sc03275sdo

    Joined:
    Dec 26, 2021
    Posts:
    12
    I created a new project in unity2020.3.The Netcode for entities vertion is 0.50.1.
    I just created a scene as the document's "Get Started" in https://docs.unity3d.com/Packages/com.unity.netcode@0.50/manual/getting-started.html said.
    It seems normal when enter the play mode in unity editor.The cube and the plane can be shown in both game and scene and i can move the cube through keys wsad.Ofcourse the entities shown in entities debugger ,both in client world and in server world.
    However,when i build the scene into an independent client and run it,I can only see an empty sky, both the plane and the cube is missing.
    I tried to search some tutorial for netcode for entities in google and ytb,but only can find some about dots or netcode for gameobject.
    As a result I can only guess what happened:
    1.Entities can not exist normally in independent client;
    2.SubScene can not be packaged or shown normally;
    3. Entitite can exist in an independent client but cannot be renderd normally;
    Anyone sufferd the same problem ever? I really need your experices.
    Thanks very much!
     
  2. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    882
    SubScene and entities are renderer in a player build of course and they work as expected.

    How did you build the project? Are you using the ScriptableBuildPipeline or are using the classic Unity build?
    Are you making a Client-Server or a Client only build?
    In the latter you need also to run the server on the editor (or a client-server) but at least the plane should be renrdered. The the cube will not displayed until the client isn't connected to the server and in game,
     
  3. sc03275sdo

    sc03275sdo

    Joined:
    Dec 26, 2021
    Posts:
    12
    I have update the project to urp,but i build in the classic way: File->Build Setting->Build .I run the game in editor in client&server mode. And i didnot change the setting when build it.
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,753
    Subscenes must be built through the new pipeline.

    https://docs.unity3d.com/Packages/com.unity.entities@0.50/manual/ecs_building_projects.html

     
    sc03275sdo likes this.
  5. sc03275sdo

    sc03275sdo

    Joined:
    Dec 26, 2021
    Posts:
    12