可帮助从编辑器与着色器配合使用的 Utility 函数。
| allowAsyncCompilation | 为 true 时,允许在当前调用站点中使用异步着色器编译。 | 
| anythingCompiling | 为 true 时,编译器在查询时异步编译一些着色器。 | 
| hardwareSupportsRectRenderTexture | 当前硬件是否支持渲染纹理。 | 
| ClearCachedData | 清除为给定着色器生成的所有内部缓存数据(如错误和编译信息)。 | 
| ClearShaderMessages | 清除给定着色器的编译时间消息。 | 
| CompilePass | 请求编辑器编译给定材质的特定通道所需的着色器变体。 | 
| CreateShaderAsset | Creates a new Shader object from the provided source code string. You can use this method alongside the ScriptedImporter to create custom shader generation tools in the Editor. | 
| GetAllShaderInfo | 返回所有可用着色器的 ShaderInfo 数组,包括内置着色器。 | 
| GetCallableShaderCount | 返回给定 RayTracingShader 中定义的可调用着色器数。 | 
| GetCallableShaderName | 返回给定 RayTracingShader 中用户定义的可调用着色器的名称。 | 
| GetCallableShaderParamSize | 返回给定 RayTracingShader 中用户定义的可调用着色器的参数大小。 | 
| GetComputeShaderMessageCount | 返回 Unity 着色器编译器为给定 ComputeShader 生成的错误和警告数。 | 
| GetComputeShaderMessages | 返回 Unity 着色器编译器为给定 ComputeShader 生成的每个错误和警告。 | 
| GetMissShaderCount | 返回给定 RayTracingShader 中定义的未命中着色器数。 | 
| GetMissShaderName | 返回给定 RayTracingShader 中用户定义的未命中着色器的名称。 | 
| GetMissShaderRayPayloadSize | 返回给定 RayTracingShader 中用户定义的未命中着色器的光线有效负载大小。 | 
| GetPropertyCount | 获取着色器中的属性数量。 | 
| GetPropertyDescription | 获取着色器的 propertyIdx 索引处的着色器属性的描述。 | 
| GetPropertyName | 获取着色器的 propertyIdx 索引处的着色器属性的名称。 | 
| GetPropertyType | 获取着色器的 propertyIdx 索引处的着色器属性的 ShaderProperyType。 | 
| GetRangeLimits | 获取着色器的 propertyIdx 索引处的范围属性的限制。 | 
| GetRayGenerationShaderCount | 返回给定 RayTracingShader 中定义的光线生成着色器数。 | 
| GetRayGenerationShaderName | 返回给定 RayTracingShader 中用户定义的光线生成着色器的名称。 | 
| GetRayTracingShaderMessageCount | 返回着色器编译器为给定 RayTracingShader 生成的错误和警告数。 | 
| GetRayTracingShaderMessages | 返回着色器编译器为给定 RayTracingShader 生成的每个错误和警告。 | 
| GetShaderData | 获取特定着色器的着色器数据。 | 
| GetShaderMessageCount | 返回 Unity 着色器编译器为给定 Shader 生成的错误和警告数。 | 
| GetShaderMessages | 返回 Unity 着色器编译器为给定 Shader 生成的每个错误和警告。 | 
| GetTexDim | 获取着色器属性的纹理尺寸。 | 
| HasProceduralInstancing | Determines whether the specified Shader contains a valid Procedural Instancing variant. | 
| IsPassCompiled | 检查材质中给定通道的着色器变体是否已编译。 | 
| IsShaderPropertyHidden | 着色器的 propertyIdx 索引处的着色器属性是否隐藏? | 
| IsShaderPropertyNonModifiableTexureProperty | 着色器的 propertyIdx 索引处的着色器属性是否为 NonModifiableTextureProperty? | 
| RegisterShader | 注册用户创建的着色器。 | 
| RestoreAsyncCompilation | 在此 CommandBuffer 范围中恢复以前的着色器编译模式。 | 
| SetAsyncCompilation | 在 CommandBuffer 中添加着色器编译模式命令。 | 
| ShaderHasError | 如果给定 Shader 生成任何错误,则返回 true。忽略警告。 | 
| UpdateShaderAsset | Replaces the existing source code in the specified shader with the source code in the supplied string. |