Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

ECS not working after upgrading to HDRP

Discussion in 'Entity Component System' started by DenizCetinalp, Jul 25, 2018.

  1. DenizCetinalp

    DenizCetinalp

    Joined:
    Feb 8, 2014
    Posts:
    16
    I updated my project to the latest unity version (2018.2.0f2). Updated Entities to the latest version (0.0.12-preview.8) with the package manager. At this point my project was still working fine.

    After downloading the latest HDRP from the package manager and going through the upgrade process, none of my MeshInstanceRenderers are being rendered.

    I dont get any errors in Unity (I can even run the game, but MeshInstanceRenderers are not rendered), however when opening the project in Visual Studio, none of the ECS namespaces can be found:

    The type or namespace name 'Entities' does not exist in the namespace 'Unity' (are you missing an assembly reference?
    Or
    The type or namespace name 'Rendering' does not exist in the namespace 'Unity' (are you missing an assembly reference?
    etc.

    Am I missing something? Can ECS be used with the HDRP with the latest official unity release?
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    I haven't tested HDRP with Entities so I don't know if it works, but I have no issue with the LWRP.

    Are you sure you updated all your materials to be HDRP compliant that you are passing to the MeshInstanceRenderer? Do they render if you just shove them on a meshrenderer?
     
  3. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    Did you have the compilation setting set to .NET 4.X? See if maybe that setting got changed somehow.
     
  4. DenizCetinalp

    DenizCetinalp

    Joined:
    Feb 8, 2014
    Posts:
    16
    I was able to get the HDRP working with ECS in the latest version. However the namespaces still cannot be found in visual studio. After downgrading Unity to the last version I used (2018.1.5f1) the namespaces work fine. So it seems to be the latest Unity version.

    Can anyone verify if they are having issues with the ECS namespaces after upgrading to unity 2018.2.0f2.

    Edit: I confirmed .NET4x is set.
     
  5. DenizCetinalp

    DenizCetinalp

    Joined:
    Feb 8, 2014
    Posts:
    16
    Fixed namespaces issue by copying the packages from the temp directory to the packages directory. Definitely something going on with Unity 2018.2, tested on multiple machines.

    As for HDRP, its the custom shaders that wont work with ECS. HDRP doesnt seem to support gpu instancing, which is a requirement for ECS. Do we have an estimate for when this will be supported? LWRP already supports this.
     
  6. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Did you enable the instancing checkbox on all the materials?