diff --git a/Editor/Core/Scripts/Settings/GraphicsSettingsUtility.cs b/Editor/Core/Scripts/Settings/GraphicsSettingsUtility.cs index 7aa52bf7..c9bc84c7 100644 --- a/Editor/Core/Scripts/Settings/GraphicsSettingsUtility.cs +++ b/Editor/Core/Scripts/Settings/GraphicsSettingsUtility.cs @@ -49,6 +49,11 @@ public static void AddPreloadShaderVariants(bool checkForMissingVariants = false var newArrayIndex = shaderPreloadArray.arraySize; var shaderVariants = AssetDatabase.LoadAssetAtPath(GetTargetShaderPath()); + if (shaderVariants == null) + { + Debug.LogWarning($"Shader variants not found at {GetTargetShaderPath()}"); + return; + } if (checkForMissingVariants) { var shadersMissing = true;