Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question DrawMeshInstancedIndirect not support WebGL?

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

  1. Stormer2020

    Stormer2020

    Joined:
    Sep 14, 2020
    Posts:
    95
    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:
    5,225
    What unity version and post the exact code
     
  3. Stormer2020

    Stormer2020

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

    DevDunk

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

    StaggartCreations

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

    Stormer2020

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

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,766
    Stormer2020 likes this.