Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

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:
    8,394
    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.