文档

Unity Engine

Unity Engine

GetCustomEditorForRenderPipeline

Gets the class name of the custom editor that a shader uses for a render pipeline asset type, identified by its full type name.
阅读时间1 分钟最后更新于 16 天前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

GetCustomEditorForRenderPipeline(Shader, string)

Gets the class name of the custom editor that a shader uses for a render pipeline asset type, identified by its full type name.
public static string GetCustomEditorForRenderPipeline(Shader shader, string renderPipelineType)

Parameters

shader

The shader to check.

renderPipelineType

The full name of the render pipeline asset type.

Returns

Type

Description

stringThe full class name of the custom editor, or null if the shader is null or has no custom editor for the render pipeline.

Remarks

A shader can specify a different custom editor for each render pipeline with a
CustomEditorForRenderPipeline
ShaderLab block. For more information, refer to SL-CustomEditor. Use this overload when you have the type name of the render pipeline asset as a string rather than as a Type.

GetCustomEditorForRenderPipeline(Shader, Type)

Gets the class name of the custom editor that a shader uses for a render pipeline asset type.
public static string GetCustomEditorForRenderPipeline(Shader shader, Type renderPipelineType)

Parameters

shader

The shader to check.

renderPipelineType

The type of the render pipeline asset.

Returns

Type

Description

stringThe full class name of the custom editor, or null if the shader is null or has no custom editor for the render pipeline.

Remarks

A shader can specify a different custom editor for each render pipeline with a
CustomEditorForRenderPipeline
ShaderLab block. For more information, refer to SL-CustomEditor. Use this method to find which custom editor the shader uses for a specific render pipeline. To get the custom editor for the active render pipeline, use ShaderUtil.GetCurrentCustomEditor.