NewRendererFeatureDropdownItem.cs 667 B

12345678910111213141516
  1. using UnityEditor.Rendering.Universal.Internal;
  2. namespace UnityEditor.Rendering.Universal
  3. {
  4. internal static class NewRendererFeatureDropdownItem
  5. {
  6. static readonly string defaultNewClassName = "CustomRenderPassFeature.cs";
  7. [MenuItem("Assets/Create/Rendering/Universal Render Pipeline/Renderer Feature", priority = EditorUtils.lwrpAssetCreateMenuPriorityGroup2)]
  8. internal static void CreateNewRendererFeature()
  9. {
  10. string templatePath = AssetDatabase.GUIDToAssetPath(ResourceGuid.rendererTemplate);
  11. ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, defaultNewClassName);
  12. }
  13. }
  14. }