Search Unity

Bug DrawMeshNow() the electric boogaloo?

Discussion in 'Shaders' started by neoshaman, Aug 23, 2020.

  1. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I have been trying to use Graphics.DrawMeshNow() and the render basically flash at random, I also happen to debug log the current camera, which also happen to alternate widely between null and main, and that seems to match the the flashing of teh mesh rendered by Drawmeshnow ... WHAT IS HAPPENING? is there is a fix, is it a bug? Why camera current becomes null?
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Are you on built-in? URP? HDRP? Custom SRP?
    Does this happen in the Editor or in the built app?
     
  3. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I'm on built in, unity 2018, in editor (for now)

    haven't tried on build yet because i didn't have mastery over the parameters yet (like correctly positioning mesh to stamp on the texture where i want).

    I haven't tried over srp, or other unity versions, because I'm not sure what's the trade off yet about features, as im still doing experimental stuff, so i sticked to the devil i know. I'm doing a proof of concept before porting elsewhere.
     
    Last edited: Aug 23, 2020
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    It sounds like a bug to me :)
    Can you please submit a bug report?
     
    neoshaman likes this.
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I don't remember if I filed a bug report oups ... I think I did, but it's still there in 2020.3.23f1

    I work around it by not doing render (DrawMeshNow) in update but in start ... which work in editor (stable, since the render only happen once), but nothing work in build I don't get it
     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,028
    Perhaps it's worth another try with a bug report then?
     
    neoshaman likes this.
  7. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Will do
     
    aleksandrk likes this.