Search Unity

Netcode + URP not working ?

Discussion in 'NetCode for ECS' started by Telroshan, Jan 21, 2020.

  1. Telroshan

    Telroshan

    Joined:
    Feb 13, 2017
    Posts:
    2
    Hello there,

    So I finally decided to try out the netcode, following the Getting started with NetCode guide, and also cloning the Unity's multiplayer repo.

    Both work fine when I build standalones, however, not with URP.
    (The build configs btw - correct me if I'm doing it wrong there ;
    Client build : UNITY_CLIENT scripting define
    Server build : The server build checkbox in the build settings, aka headless mode)

    So, the builds work totally fine with the built-in render pipeline, if I take the NetCube example, I can move my cube around, see it replicated on the other clients, all good.

    However, if I switch the project to URP (install the package, assign the Render Pipeline Asset in the project settings, and upgrade the materials), then... It still works in the editor, but doesn't work on the client build.

    What happens is that, on the client build, the cube is indeed spawned, but at the (0, 0, 0) world position, and nothing moves at all.
    The thing is, if I run the editor as a client behind, I can see my client build's cube moving when i press the inputs, so the client build indeed communicates with the server, the movements are replicated, and so on.
    It's just the rendering that's broken on the standalone.

    I don't know at all what could be the reason of that behaviour (especially as it's working as it should in the editor, and as I don't get any error log from the client build), so any help would be greatly appreciated !

    In case you'd like to check, the steps to reproduce the issue would simply be ;
    - Clone the multiplayer repo
    - Make the 2 builds (server + client) with the NetCube scene => everything works
    - Upgrade the project to URP
    - Make 2 new builds => see what happens on the client build

    Thanks by advance !

    Note : In case that could be useful, I'm on the 2019.3.0f5, with the latest packages versions which are
    - Entities 0.5.0
    - Hybrid Renderer 0.3.2
    - NetCode 0.0.4
    - Transport 0.2.3
    - URP 7.1.7
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    As far as I'm aware hybrid renderer does not support URP at the moment, only HDRP. Support should come middle of year I believe.
     
    Telroshan likes this.
  3. Telroshan

    Telroshan

    Joined:
    Feb 13, 2017
    Posts:
    2
    Oh, kill me...
    Could have sworn I was using URP + Hybrid Renderer on another project, but I just checked and the plot twist is I was instantiating game objects because of the animators I still needed.
    Well, that was quickly solved then, thanks for your super-fast reply,