docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GenerateShaderVariantList

    This class is responsible for generating a shader variant list from the player log. It reads the log file and extracts the shader variants that were compiled during the test run. It also handles the conversion of shader not found errors to log entries.

    Inheritance
    object
    GenerateShaderVariantList
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.TestTools.Graphics
    Assembly: UnityEngine.TestTools.Graphics.dll
    Syntax
    public static class GenerateShaderVariantList

    Fields

    k_CompiledShaderString

    The string used to identify compiled shaders in the log.

    Declaration
    public static readonly string k_CompiledShaderString
    Field Value
    Type Description
    string

    k_UseFastShaderVariantListGeneration

    The environment variable used to determine if the fast shader variant list generation should be used.

    Declaration
    public static readonly string k_UseFastShaderVariantListGeneration
    Field Value
    Type Description
    string

    k_UseGraphicsTestStripperEnv

    The environment variable used to determine if the Graphics Test Stripper should be used. This is used to enable or disable the Graphics Test Stripper system.

    Declaration
    public static readonly string k_UseGraphicsTestStripperEnv
    Field Value
    Type Description
    string

    s_CompiledComputeKernelRegex

    The string used to identify compiled compute kernels in a UnityShaderCompiler log.

    Declaration
    public static readonly Regex s_CompiledComputeKernelRegex
    Field Value
    Type Description
    Regex

    s_CompiledComputeShaderRegex

    The string used to identify compiled compute shaders in the log.

    Declaration
    public static readonly Regex s_CompiledComputeShaderRegex
    Field Value
    Type Description
    Regex

    s_CompiledShaderRegex

    The string used to identify compiled shaders in the log.

    Declaration
    public static readonly Regex s_CompiledShaderRegex
    Field Value
    Type Description
    Regex

    s_CompiledSnippetRegex

    The string used to identify compiled shader snippets in a UnityShaderCompiler log.

    Declaration
    public static readonly Regex s_CompiledSnippetRegex
    Field Value
    Type Description
    Regex

    s_NoKeywordText

    The string used to identify the absence of keywords in the log.

    Declaration
    public static readonly string s_NoKeywordText
    Field Value
    Type Description
    string

    s_ShaderVariantNotFoundRegex

    The string used to identify shader variant not found errors in the log.

    Declaration
    public static readonly Regex s_ShaderVariantNotFoundRegex
    Field Value
    Type Description
    Regex

    Methods

    AppendAllShaderLines(out StringBuilder, string, bool)

    Appends all shader lines from the player log to the final file.

    Declaration
    public static void AppendAllShaderLines(out StringBuilder finalFile, string playerLogContent, bool ignoreValidShadersAndCompute = false)
    Parameters
    Type Name Description
    StringBuilder finalFile

    The final file to which the shader lines will be appended.

    string playerLogContent

    The content of the player log file.

    bool ignoreValidShadersAndCompute

    If true, valid shaders and compute shaders will be ignored.

    AppendAllShaderLines(out StringBuilder, string, SortedSet<string>, bool)

    Appends all shader lines from the player log to the final file. This overload allows for an existing file content to be passed in.

    Declaration
    public static void AppendAllShaderLines(out StringBuilder finalFile, string playerLogContent, SortedSet<string> existingFileContent, bool ignoreValidShadersAndCompute = false)
    Parameters
    Type Name Description
    StringBuilder finalFile

    The final file to which the shader lines will be appended.

    string playerLogContent

    The content of the player log file.

    SortedSet<string> existingFileContent

    The existing file content to which the shader lines will be appended.

    bool ignoreValidShadersAndCompute

    If true, valid shaders and compute shaders will be ignored.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)