Create URP .asset file from Editor Script

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.

One would imagine you just CreateInstance the UniversalRenderPipelineAsset: Class UniversalRenderPipelineAsset | Universal RP | 12.1.15 and save it to a directory in the same way you any other scriptable object/asset.

1 Like

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.