Version: 2022.3
言語: 日本語
public static void UpdateShaderAsset (AssetImporters.AssetImportContext context, Shader shader, string source, bool compileInitialShaderVariants);
public static void UpdateShaderAsset (Shader shader, string source, bool compileInitialShaderVariants);
public static void UpdateShaderAsset (Shader shader, string source);

パラメーター

context A context object that the asset system needs to register shader dependencies properly.
source A string that contains a shader written in ShaderLab code.
compileInitialShaderVariants Set to true to compile the ShaderLab code contained in the source string; otherwise false.
shader The Shader to update.

説明

Replaces the existing source code in the specified shader with the source code in the supplied string.