ShaderUtil

class in UnityEditor

Switch to Manual

Description

可帮助从编辑器与着色器配合使用的 Utility 函数。

Static Variables

hardwareSupportsRectRenderTexture当前硬件是否支持渲染纹理。

Static Functions

ClearShaderErrorsClears compile time messages for the given shader.
GetAllShaderInfo返回所有可用着色器的 ShaderInfo 数组,包括内置着色器。
GetPropertyCount获取着色器中的属性数量。
GetPropertyDescription获取着色器的 propertyIdx 索引处的着色器属性的描述。
GetPropertyName获取着色器的 propertyIdx 索引处的着色器属性的名称。
GetPropertyType获取着色器的 propertyIdx 索引处的着色器属性的 ShaderProperyType。
GetRangeLimits获取着色器的 propertyIdx 索引处的范围属性的限制。
GetShaderData获取特定着色器的着色器数据。
GetTexDim获取着色器属性的纹理尺寸。
IsShaderPropertyHidden着色器的 propertyIdx 索引处的着色器属性是否隐藏?
IsShaderPropertyNonModifiableTexureProperty着色器的 propertyIdx 索引处的着色器属性是否为 NonModifiableTextureProperty?
RegisterShader注册用户创建的着色器。
UpdateShaderAssetReplaces the existing source code in the specified shader with the source code in the supplied string. The override provides a boolean that specifies whether the shader should be recompiled.