Search Unity

Multi Render Pipeline Asset

Discussion in 'Assets and Asset Store' started by DevDunk, Aug 7, 2022.

  1. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    I am making a visual asset using shader graph and I need to use different shaders depending on the Render Pipeline (URP/HDRP).
    What would be the best way to manage this? I would like to have both in 1 asset instead of making 2 separate ones.

    Would I just include both shaders and materials in different folders?
    Should I have a .unitypackage for the URP and HDRP versions? (don't think this will be accepted since the asset then would just be 2 packages)
    Do I need to write a script to convert the assets in a way for HDRP?
     
  2. BetaMark

    BetaMark

    Joined:
    Sep 27, 2014
    Posts:
    229
    The way I've seen it done which I like the most is when the package downloaded from asset store works with built in pipeline by default, and then there are two unitypackage files, one for URP and one for HDRP. Then you just need to put a giant notice on the documentation and store details that to get URP or HDRP, I have to install one of those packages which will overwrite the base materials and shaders with the URP or HDRP versions of them.
     
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    Mine only has URP and HDRP support, so I guess I'll make URP the base then.
    If the material and shaders in the hdrp unity package has the same name as the existing shader, will it override it?
     
  4. BetaMark

    BetaMark

    Joined:
    Sep 27, 2014
    Posts:
    229
    Yeah, put them in the same folder and the same filenames and the new Unity Package will overwrite it.
    I know its wasteful to have both the URP and the HDRP packages in there, but if someone wants to switch to HDRP and later decides to switch back to URP, it might be useful to have both packages and the URP stuff in the base release.
     
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    Gotcha, thanks!
    Let's see if the asset store accepts that (ill document it properly)
     
    BetaMark likes this.