docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AnalysisParams

    Represents an object which can be passed to an instance of ProjectAuditor to specify how analysis should be performed and to provide delegates to be called when analysis steps have completed. AnalysisParams defaults to values which instruct ProjectAuditor to analyze everything in the project for the current build target, but instances can be populated with custom data in an object initializer to provide additional constraints.

    Inheritance
    object
    AnalysisParams
    SessionInfo
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.ProjectAuditor.Editor
    Assembly: Unity.ProjectAuditor.Editor.dll
    Syntax
    [Serializable]
    public class AnalysisParams

    Constructors

    AnalysisParams(bool)

    AnalysisParams constructor.

    Declaration
    public AnalysisParams(bool copyParamsFromGlobal = true)
    Parameters
    Type Name Description
    bool copyParamsFromGlobal

    If true, the global ProjectSettings will register DiagnosticParams defaults, save any changes and copy the data into this object. This is usually the desired behaviour, but is not allowed during serialization.

    AnalysisParams(AnalysisParams)

    Copy constructor.

    Declaration
    public AnalysisParams(AnalysisParams original)
    Parameters
    Type Name Description
    AnalysisParams original

    The AnalysisParams object to copy from.

    Fields

    AssemblyNames

    Assemblies to analyze. If null, all compiled assemblies will be analyzed.

    Declaration
    public string[] AssemblyNames
    Field Value
    Type Description
    string[]

    Categories

    Issue Categories to include in the audit. If null, the analysis will include all categories.

    Declaration
    [SerializeField]
    public IssueCategory[] Categories
    Field Value
    Type Description
    IssueCategory[]

    CodeOptimization

    Code optimization mode. The default is Release.

    Declaration
    public CodeOptimization CodeOptimization
    Field Value
    Type Description
    CodeOptimization

    CompilationMode

    The Compilation mode to use during code analysis. The default is Player.

    Declaration
    public CompilationMode CompilationMode
    Field Value
    Type Description
    CompilationMode

    DiagnosticParams

    The DiagnosticParams object which defines the customizable thresholds for reporting certain diagnostics. By default, this makes a copy of ProjectAuditorSettings.

    Declaration
    public DiagnosticParams DiagnosticParams
    Field Value
    Type Description
    DiagnosticParams

    OnCompleted

    Notifies that all Modules completed their analysis.

    Declaration
    [JsonIgnore]
    public Action<Report> OnCompleted
    Field Value
    Type Description
    Action<Report>

    OnIncomingIssues

    Reports a batch of new issues. Note that this be called multiple times per analysis.

    Declaration
    [JsonIgnore]
    public Action<IEnumerable<ReportItem>> OnIncomingIssues
    Field Value
    Type Description
    Action<IEnumerable<ReportItem>>

    OnModuleCompleted

    Notifies that a Module completed its analysis.

    Declaration
    [JsonIgnore]
    public Action<AnalysisResult> OnModuleCompleted
    Field Value
    Type Description
    Action<AnalysisResult>

    Properties

    Platform

    Analysis platform. The default platform is the currently active build target.

    Declaration
    [JsonConverter(typeof(BuildTargetJsonConverter))]
    public BuildTarget Platform { get; set; }
    Property Value
    Type Description
    BuildTarget

    Methods

    WithAdditionalDiagnosticRules(List<Rule>)

    Adds a list of additional Rules which will be applied during analysis.

    Declaration
    public AnalysisParams WithAdditionalDiagnosticRules(List<Rule> rules)
    Parameters
    Type Name Description
    List<Rule> rules

    Additional Rules to impose.

    Returns
    Type Description
    AnalysisParams

    This AnalysisParams object, after adding the additional Rules.

    In This Article
    Back to top
    Copyright © 2025 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)