Search Unity

Question Create URP .asset file from Editor Script

Discussion in 'General Graphics' started by fc-ts, Jan 12, 2022.

  1. fc-ts

    fc-ts

    Joined:
    Jan 12, 2022
    Posts:
    7
    Hello,
    I'd like to create a UniversalRenderPipelineAsset.asset file from an editor script, just like I would do manually from editor, and then apply it to the Graphics settings.

    In editor I just right-click somewhere in the Assets folder and then:
    Create > Rendering > Universal Render Pipeline > Pipeline Asset (Forward Renderer)


    But by script I cannot figure out how to create this .asset file, I also tried to search into the URP folder downloaded from the UPM but I could not find the ScriptableObject from which this file is created.

    Thanks in advance and have a nice day.
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,842
    fc-ts likes this.
  3. fc-ts

    fc-ts

    Joined:
    Jan 12, 2022
    Posts:
    7
    Thanks, you are right, I missed this script.

    Now the problem that arises is to understand how to create an .asmdef file and add to it the reference of the .asmdef file which includes the UniversalRenderPipelineAsset script.