UpdateShaderAsset
Replaces the existing source code in the specified shader with the source code in the supplied string.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
UpdateShaderAsset(AssetImportContext, Shader, string, bool)
Replaces the existing source code in the specified shader with the source code in the supplied string.
public static void UpdateShaderAsset(AssetImportContext context, Shader shader, string source, bool compileInitialShaderVariants)
Parameters
A context object that the asset system needs to register shader dependencies properly.
UpdateShaderAsset(Shader, string)
Replaces the existing source code in the specified shader with the source code in the supplied string.
public static void UpdateShaderAsset(Shader shader, string source)
Parameters
UpdateShaderAsset(Shader, string, bool)
Replaces the existing source code in the specified shader with the source code in the supplied string.
public static void UpdateShaderAsset(Shader shader, string source, bool compileInitialShaderVariants)