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

[Fixed in p29] [Bug] ECS disables DrawMeshInstanced

Discussion in 'Entity Component System' started by sngdan, Mar 8, 2019.

  1. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    Unity: 2019.1.0b5
    OS: MacOS 10.13.6
    ECS: preview.26 & preview.27

    How to reproduce:
    1. Fresh 2019.1.0b5 install
    2. Import attached package & run -> DrawMeshInstanced works
    3. Install ECS via package manager & run -> DrawMeshInstanced does not render in game view (scene view & build works)
    Note: Contents of attached unitypackage
    - scene
    - material with gpu instancing enabled
    - GFXTest c#
     

    Attached Files:

    Rotary-Heart and GilCat like this.
  2. Erothez

    Erothez

    Joined:
    May 27, 2015
    Posts:
    20
    Just ran into this same issue, we use draw mesh instanced for a bunch of debugging stuff.

    Did you manage to find a workaround?
     
  3. Singtaa

    Singtaa

    Joined:
    Dec 14, 2010
    Posts:
    492
    Update:

    The bug should be located in SubSceneLiveLinkSystem. So for now as a workaround, you can use ICustomBootstrap to skip this system.

    Code (CSharp):
    1. public class CustomBootstrap : ICustomBootstrap
    2. {
    3.     public List<Type> Initialize(List<Type> systems)
    4.     {
    5.         return systems.Where((t) => t.Name != "SubSceneLiveLinkSystem").ToList();
    6.     }
    7. }
    Original:

    I'm still looking into this. But right now, disabling the default world initialization will fix it. (so set UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP in your scripting define symbols)
     
    Last edited: Mar 8, 2019
    GilCat, sngdan and Rotary-Heart like this.
  4. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Glad to see that I'm not the only one. There must be other way to fix this, perhaps an internal system is overdrawing and clearing the view?
     
    GilCat likes this.
  5. Singtaa

    Singtaa

    Joined:
    Dec 14, 2010
    Posts:
    492
    Yeah, I just updated my previous post. You can disable SubSceneLiveLinkSystem for the time being. Hopefully the Unity folks will fix this in the next version.
     
    Rotary-Heart likes this.
  6. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    Perfect, lovely easy fix.
     
  7. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    This is most likely due to the SceneCullingMask setup we use for managing all the SubScenes. I'll take a look.
     
    eizenhorn, FROS7, GilCat and 2 others like this.
  8. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    WIll be fixed in the next release.
     
    eizenhorn, FROS7, GilCat and 6 others like this.
  9. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
  10. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    Fixed in preview 29 - thx
     
    GilCat likes this.