Search Unity

DrawMeshInstanced not working with Asset Bundles loaded content

Discussion in 'Asset Bundles' started by HTFClem, Aug 6, 2019.

  1. HTFClem

    HTFClem

    Joined:
    Sep 5, 2018
    Posts:
    8
    Hi there,

    We use 2018.4 at the moment. We have been using Asset Bundles for a while, and Shader Variant Collections to include all the shaders we need.

    I recently had to make a custom, quick and simple particles system for a small feature in the game, using DrawMeshInstanced for rendering. It works with no problem if not relying on Asset Bundles (in Editor), but doesn't render a thing (even in the Frame Debugger, they are not just invisible) if using Asset Bundles.

    If I replace the call to DrawMeshInstanced by a loop of DrawMesh, it works fine.

    Our Shader Variant Collections does include the proper keywords including INSTANCING_ON to allow GPU instancing.

    It worked fine in 2017.4, but not since we upgraded to 2018.4.

    Any idea what it could be, or how to troubleshoot the issue further, please?

    Thanks,

    Clem