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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question DrawMeshInstancedIndirect not support WebGL?

Discussion in 'General Graphics' started by starock2020, May 23, 2022.

  1. starock2020

    starock2020

    Joined:
    Sep 14, 2020
    Posts:
    68
    Hi~

    I just have a test for DrawMeshInstancedIndirect sample code:

    Graphics.DrawMeshInstancedIndirect
    https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html

    It's works great on windows platform(Standalone).

    But nothing display when I build on WebGL.

    So, dose DrawMeshInstancedIndirect works on WebGL?

    Help please~ I really need this function. :(

    Dev environment:
    Unity 2020.3.14f1
    Win10
    -------------------------------------------------------------------------------------
    If it not support on WebGL, any method to optimize a great quantity of game object in the scence? Thank you!!~
     

    Attached Files:

    Last edited: May 24, 2022
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,938
    What unity version and post the exact code
     
  3. starock2020

    starock2020

    Joined:
    Sep 14, 2020
    Posts:
    68
    Unity 2020.3.14f1
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    2,938
    Update to the latest LTS. If it still doesn't work make a bug report
     
  5. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,963
    No dice unfortunately. WebGL doesn't support compute buffers, which is what Graphics.DrawMeshInstancedIndirect hinges on.
     
    starock2020 likes this.
  6. starock2020

    starock2020

    Joined:
    Sep 14, 2020
    Posts:
    68
    Oh man~ :eek:
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    18,505
    starock2020 likes this.